Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / HttpProxyCredentialType.cs / 1 / HttpProxyCredentialType.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Net; public enum HttpProxyCredentialType { None, Basic, Digest, Ntlm, Windows, } static class HttpProxyCredentialTypeHelper { internal static bool IsDefined(HttpProxyCredentialType value) { return (value == HttpProxyCredentialType.None || value == HttpProxyCredentialType.Basic || value == HttpProxyCredentialType.Digest || value == HttpProxyCredentialType.Ntlm || value == HttpProxyCredentialType.Windows); } internal static AuthenticationSchemes MapToAuthenticationScheme(HttpProxyCredentialType proxyCredentialType) { AuthenticationSchemes result; switch (proxyCredentialType) { case HttpProxyCredentialType.None: result = AuthenticationSchemes.Anonymous; break; case HttpProxyCredentialType.Basic: result = AuthenticationSchemes.Basic; break; case HttpProxyCredentialType.Digest: result = AuthenticationSchemes.Digest; break; case HttpProxyCredentialType.Ntlm: result = AuthenticationSchemes.Ntlm; break; case HttpProxyCredentialType.Windows: result = AuthenticationSchemes.Negotiate; break; default: DiagnosticUtility.DebugAssert("unsupported proxy credential type"); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException()); } return result; } internal static HttpProxyCredentialType MapToProxyCredentialType(AuthenticationSchemes authenticationSchemes) { HttpProxyCredentialType result; switch (authenticationSchemes) { case AuthenticationSchemes.Anonymous: result = HttpProxyCredentialType.None; break; case AuthenticationSchemes.Basic: result = HttpProxyCredentialType.Basic; break; case AuthenticationSchemes.Digest: result = HttpProxyCredentialType.Digest; break; case AuthenticationSchemes.Ntlm: result = HttpProxyCredentialType.Ntlm; break; case AuthenticationSchemes.Negotiate: result = HttpProxyCredentialType.Windows; break; default: DiagnosticUtility.DebugAssert("unsupported authentication Scheme"); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException()); } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataBindingCollectionConverter.cs
- TextServicesContext.cs
- UpdateCommandGenerator.cs
- DataServiceRequestException.cs
- SrgsSubset.cs
- SerializationObjectManager.cs
- Rect3DValueSerializer.cs
- DataMemberListEditor.cs
- XmlQueryStaticData.cs
- NetCodeGroup.cs
- WpfWebRequestHelper.cs
- RecognizeCompletedEventArgs.cs
- EntityUtil.cs
- CombinedGeometry.cs
- GeometryHitTestParameters.cs
- RayHitTestParameters.cs
- BinHexEncoding.cs
- StoreContentChangedEventArgs.cs
- ModelTreeEnumerator.cs
- WorkflowViewStateService.cs
- XmlBinaryReader.cs
- CodeTypeParameter.cs
- ColorConverter.cs
- safelink.cs
- PathFigureCollection.cs
- ParameterCollection.cs
- DataServiceQuery.cs
- CaretElement.cs
- SharedConnectionInfo.cs
- PropertyTabChangedEvent.cs
- ImageMetadata.cs
- ConfigurationConverterBase.cs
- Array.cs
- SwitchElementsCollection.cs
- _ListenerResponseStream.cs
- PropertyValueUIItem.cs
- COM2EnumConverter.cs
- XPathDocumentIterator.cs
- TextDecorationUnitValidation.cs
- LateBoundBitmapDecoder.cs
- SafeBitVector32.cs
- DeadCharTextComposition.cs
- PageContent.cs
- SessionSwitchEventArgs.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ServiceBusyException.cs
- CharStorage.cs
- ClientBuildManagerCallback.cs
- InputBindingCollection.cs
- JavaScriptObjectDeserializer.cs
- SerialPort.cs
- EntityDataSourceQueryBuilder.cs
- EventLogInternal.cs
- ProxyHwnd.cs
- SettingsPropertyValueCollection.cs
- XmlHierarchyData.cs
- Script.cs
- SchemaType.cs
- InertiaTranslationBehavior.cs
- OracleParameter.cs
- Quaternion.cs
- EventLogPermissionAttribute.cs
- XsltQilFactory.cs
- DataContractSet.cs
- EtwProvider.cs
- SchemaComplexType.cs
- SqlDataSourceCustomCommandEditor.cs
- TextDecorationLocationValidation.cs
- InvalidProgramException.cs
- SectionInput.cs
- PropertyEmitterBase.cs
- MiniModule.cs
- CompilerState.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- User.cs
- StandardOleMarshalObject.cs
- DbProviderFactoriesConfigurationHandler.cs
- Light.cs
- RemoteWebConfigurationHostServer.cs
- HierarchicalDataTemplate.cs
- WsdlInspector.cs
- MessagePropertyFilter.cs
- SafeFindHandle.cs
- MeshGeometry3D.cs
- Scene3D.cs
- RootDesignerSerializerAttribute.cs
- WsdlInspector.cs
- SafeThemeHandle.cs
- WorkflowTraceTransfer.cs
- SqlPersonalizationProvider.cs
- EditCommandColumn.cs
- QueryExpr.cs
- mansign.cs
- CapabilitiesPattern.cs
- PkcsUtils.cs
- GridView.cs
- CachedTypeface.cs
- ValidationRuleCollection.cs
- BuildProviderInstallComponent.cs
- TabPanel.cs