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
- Metafile.cs
- DataControlPagerLinkButton.cs
- Model3D.cs
- ImageBrush.cs
- SystemWebSectionGroup.cs
- Point3DAnimation.cs
- CodeConstructor.cs
- COAUTHINFO.cs
- BuildProviderUtils.cs
- WindowsStatusBar.cs
- XmlTypeMapping.cs
- HttpProfileBase.cs
- XmlReader.cs
- DataViewSetting.cs
- ConfigurationStrings.cs
- CommonXSendMessage.cs
- LogStore.cs
- SignatureHelper.cs
- NativeMethods.cs
- DomainConstraint.cs
- TextParagraph.cs
- FixedSOMSemanticBox.cs
- DataControlCommands.cs
- ArithmeticException.cs
- PointAnimationBase.cs
- GifBitmapDecoder.cs
- BStrWrapper.cs
- EndpointDiscoveryMetadata.cs
- CancellableEnumerable.cs
- Debug.cs
- PerfService.cs
- Table.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DbReferenceCollection.cs
- LazyTextWriterCreator.cs
- __ConsoleStream.cs
- ServicePointManagerElement.cs
- Hash.cs
- ProjectionPath.cs
- StrokeNode.cs
- SoapWriter.cs
- SupportingTokenListenerFactory.cs
- WebServiceTypeData.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- EventEntry.cs
- CollectionViewGroupInternal.cs
- SqlNotificationEventArgs.cs
- _DomainName.cs
- NetSectionGroup.cs
- VisualTreeFlattener.cs
- Peer.cs
- RelatedCurrencyManager.cs
- StopRoutingHandler.cs
- X509Extension.cs
- OrderByQueryOptionExpression.cs
- BitmapScalingModeValidation.cs
- SiteMapNodeCollection.cs
- XmlSchemaComplexType.cs
- WeakReference.cs
- CapabilitiesAssignment.cs
- ScopeElement.cs
- XsltException.cs
- Vector3dCollection.cs
- ToolStripContainer.cs
- TextBreakpoint.cs
- CodeNamespace.cs
- XmlSchemaSimpleTypeRestriction.cs
- InputScopeNameConverter.cs
- ScrollViewer.cs
- CategoryNameCollection.cs
- PassportAuthenticationEventArgs.cs
- ZipIOCentralDirectoryFileHeader.cs
- Image.cs
- PeerEndPoint.cs
- SafeThemeHandle.cs
- StorageModelBuildProvider.cs
- PropertyGroupDescription.cs
- Vector.cs
- AddInEnvironment.cs
- HierarchicalDataSourceControl.cs
- DbDataRecord.cs
- SingleSelectRootGridEntry.cs
- CodeConstructor.cs
- GB18030Encoding.cs
- DataRelationPropertyDescriptor.cs
- ISCIIEncoding.cs
- RSATokenProvider.cs
- FileDialog.cs
- diagnosticsswitches.cs
- ByteAnimation.cs
- LogicalExpressionEditor.cs
- Preprocessor.cs
- DataGridItem.cs
- ValidationErrorEventArgs.cs
- XmlResolver.cs
- ChannelSettingsElement.cs
- TimeZone.cs
- Confirm.cs
- ColumnTypeConverter.cs
- ConstrainedDataObject.cs