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
- SqlMethodAttribute.cs
- SaveFileDialog.cs
- MultiDataTrigger.cs
- IndentTextWriter.cs
- TextServicesManager.cs
- _RequestCacheProtocol.cs
- ColorConvertedBitmap.cs
- HttpCookieCollection.cs
- _MultipleConnectAsync.cs
- MailSettingsSection.cs
- WebControl.cs
- InvalidProgramException.cs
- BitmapEffectvisualstate.cs
- XamlInterfaces.cs
- ToolStripProgressBar.cs
- SimpleHandlerFactory.cs
- TempEnvironment.cs
- PropertyRef.cs
- ListViewUpdatedEventArgs.cs
- ListDesigner.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- HttpWebRequestElement.cs
- TextRunCache.cs
- PlanCompiler.cs
- PersonalizationState.cs
- EditorPartDesigner.cs
- MatrixTransform.cs
- uribuilder.cs
- DataGridComponentEditor.cs
- PeerApplication.cs
- TreeNodeMouseHoverEvent.cs
- FilterException.cs
- DataKeyCollection.cs
- AutoCompleteStringCollection.cs
- WorkItem.cs
- LambdaCompiler.Binary.cs
- GroupItem.cs
- CompiledRegexRunner.cs
- ObfuscateAssemblyAttribute.cs
- RelationshipConverter.cs
- MulticastIPAddressInformationCollection.cs
- DesignerTransaction.cs
- NamespaceCollection.cs
- SessionParameter.cs
- MaterializeFromAtom.cs
- HMACSHA1.cs
- CssClassPropertyAttribute.cs
- MessageBox.cs
- ValueQuery.cs
- wgx_exports.cs
- OleDbErrorCollection.cs
- AuthorizationSection.cs
- IntranetCredentialPolicy.cs
- ContextProperty.cs
- FullTextLine.cs
- FileFormatException.cs
- CqlParserHelpers.cs
- ResizeGrip.cs
- NumericPagerField.cs
- Label.cs
- StringValueConverter.cs
- UnitySerializationHolder.cs
- ProfileModule.cs
- SqlInternalConnectionSmi.cs
- HttpCookiesSection.cs
- EdmEntityTypeAttribute.cs
- GACIdentityPermission.cs
- AssemblyLoader.cs
- UnknownBitmapDecoder.cs
- AlternateView.cs
- SqlWorkflowPersistenceService.cs
- Parameter.cs
- FormViewPageEventArgs.cs
- TextFormatterHost.cs
- ThemeDirectoryCompiler.cs
- SHA1CryptoServiceProvider.cs
- AssociationType.cs
- TrackingMemoryStream.cs
- SqlNodeTypeOperators.cs
- Int32.cs
- ProviderBase.cs
- RijndaelCryptoServiceProvider.cs
- FacetDescription.cs
- ExpressionBuilderCollection.cs
- WindowsFormsHostPropertyMap.cs
- WebUtil.cs
- UseAttributeSetsAction.cs
- EventArgs.cs
- StylusPointPropertyInfoDefaults.cs
- SqlReferenceCollection.cs
- HTTPNotFoundHandler.cs
- AppSettingsReader.cs
- EntitySetDataBindingList.cs
- DataKeyCollection.cs
- KeyFrames.cs
- ServiceBehaviorElement.cs
- commandenforcer.cs
- UserControlAutomationPeer.cs
- CodeAccessPermission.cs
- BamlTreeUpdater.cs