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
- InputBinder.cs
- ClientBuildManagerCallback.cs
- PbrsForward.cs
- AxisAngleRotation3D.cs
- CFGGrammar.cs
- PasswordTextContainer.cs
- TransformPattern.cs
- KeyEventArgs.cs
- ellipse.cs
- EventlogProvider.cs
- CollectionCodeDomSerializer.cs
- GestureRecognizer.cs
- Evidence.cs
- FontFamilyValueSerializer.cs
- QilGenerator.cs
- WebConfigurationHostFileChange.cs
- CachedPathData.cs
- FaultDesigner.cs
- CounterCreationDataCollection.cs
- AttributeQuery.cs
- SchemaTableOptionalColumn.cs
- UnitControl.cs
- PriorityRange.cs
- ExpressionPrefixAttribute.cs
- CompleteWizardStep.cs
- BitmapEffectGroup.cs
- QilReplaceVisitor.cs
- RawContentTypeMapper.cs
- DrawingCollection.cs
- EntityDataSourceUtil.cs
- ComNativeDescriptor.cs
- Table.cs
- DurableInstanceManager.cs
- AssociationProvider.cs
- CodeVariableReferenceExpression.cs
- MsmqInputChannelListener.cs
- KeyValuePairs.cs
- _SSPIWrapper.cs
- GlobalItem.cs
- UnsafeNativeMethods.cs
- DataGridLengthConverter.cs
- TextRunTypographyProperties.cs
- LinearKeyFrames.cs
- ToolStripGrip.cs
- AdditionalEntityFunctions.cs
- coordinator.cs
- ModulesEntry.cs
- AttachmentService.cs
- DataConnectionHelper.cs
- InvalidProgramException.cs
- UnsafeCollabNativeMethods.cs
- HandlerFactoryCache.cs
- WpfMemberInvoker.cs
- ThrowOnMultipleAssignment.cs
- ExpressionNormalizer.cs
- WindowsListViewScroll.cs
- SimpleApplicationHost.cs
- Stacktrace.cs
- UxThemeWrapper.cs
- TypeConstant.cs
- SpeechSeg.cs
- UiaCoreApi.cs
- ContentPresenter.cs
- ClientOperationFormatterProvider.cs
- TypeUnloadedException.cs
- DnsPermission.cs
- AssemblyNameProxy.cs
- TextElement.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- DataGridTablesFactory.cs
- SafeRegistryHandle.cs
- AffineTransform3D.cs
- FontDialog.cs
- SchemaNotation.cs
- ConfigurationStrings.cs
- ReadContentAsBinaryHelper.cs
- WorkflowElementDialog.cs
- XmlNotation.cs
- RegistryPermission.cs
- ObjectAnimationUsingKeyFrames.cs
- CheckoutException.cs
- WebPartUserCapability.cs
- CursorInteropHelper.cs
- EventLogPermissionEntry.cs
- Dispatcher.cs
- TabletCollection.cs
- EmulateRecognizeCompletedEventArgs.cs
- RawTextInputReport.cs
- WebBrowserNavigatedEventHandler.cs
- HostProtectionPermission.cs
- HashAlgorithm.cs
- BamlReader.cs
- ItemChangedEventArgs.cs
- UserControlFileEditor.cs
- NumberSubstitution.cs
- RotateTransform3D.cs
- MimeParameters.cs
- TextStore.cs
- PermissionSetEnumerator.cs
- ViewGenResults.cs