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
- DependencyObject.cs
- ErrorFormatter.cs
- XmlException.cs
- RouteValueDictionary.cs
- PropertyDescriptorComparer.cs
- FormViewDeleteEventArgs.cs
- ValidationSummary.cs
- Partitioner.cs
- ContextMenuStrip.cs
- DbParameterHelper.cs
- ResourceReferenceExpressionConverter.cs
- BulletDecorator.cs
- ReadOnlyMetadataCollection.cs
- DuplicateWaitObjectException.cs
- NegationPusher.cs
- BypassElementCollection.cs
- ApplicationDirectoryMembershipCondition.cs
- InteropAutomationProvider.cs
- MimeBasePart.cs
- XmlNamespaceDeclarationsAttribute.cs
- DataGridAutoFormatDialog.cs
- FaultHandlingFilter.cs
- MessagingActivityHelper.cs
- RsaKeyGen.cs
- ObjectListComponentEditor.cs
- SequenceFullException.cs
- MethodImplAttribute.cs
- ScopelessEnumAttribute.cs
- TaiwanCalendar.cs
- Vertex.cs
- Comparer.cs
- cookie.cs
- NTAccount.cs
- DeploymentSectionCache.cs
- TimeSpanValidatorAttribute.cs
- RightsDocument.cs
- JumpTask.cs
- shaperfactory.cs
- SamlSecurityToken.cs
- ConsumerConnectionPoint.cs
- ControlPropertyNameConverter.cs
- PassportPrincipal.cs
- TableItemProviderWrapper.cs
- Operators.cs
- ExpressionParser.cs
- TextSelectionProcessor.cs
- CustomAttributeBuilder.cs
- WebInvokeAttribute.cs
- CertificateReferenceElement.cs
- RootBrowserWindow.cs
- SymbolType.cs
- LinkLabelLinkClickedEvent.cs
- System.Data_BID.cs
- SaveFileDialog.cs
- TraceFilter.cs
- HtmlEmptyTagControlBuilder.cs
- StrokeDescriptor.cs
- RichTextBoxConstants.cs
- CoTaskMemHandle.cs
- IODescriptionAttribute.cs
- ProtocolsConfiguration.cs
- RoutingExtension.cs
- UnauthorizedWebPart.cs
- TPLETWProvider.cs
- ExceptionDetail.cs
- EmbossBitmapEffect.cs
- GridItemCollection.cs
- UrlAuthorizationModule.cs
- FixedTextView.cs
- glyphs.cs
- MethodBuilderInstantiation.cs
- NumericUpDown.cs
- DateRangeEvent.cs
- DockingAttribute.cs
- TraceInternal.cs
- TextEditorDragDrop.cs
- Pkcs7Signer.cs
- ListSortDescriptionCollection.cs
- WsiProfilesElementCollection.cs
- EngineSite.cs
- BeginStoryboard.cs
- ClassicBorderDecorator.cs
- SymmetricCryptoHandle.cs
- DataPagerFieldItem.cs
- SynchronizedReadOnlyCollection.cs
- XmlSchemaDatatype.cs
- EventWaitHandle.cs
- HttpCachePolicyElement.cs
- UInt64.cs
- baseaxisquery.cs
- PolicyException.cs
- SafeNativeMethods.cs
- CompensateDesigner.cs
- HtmlTableCell.cs
- HwndAppCommandInputProvider.cs
- PageAdapter.cs
- LOSFormatter.cs
- TreeViewItemAutomationPeer.cs
- WindowsListViewSubItem.cs
- PolyQuadraticBezierSegmentFigureLogic.cs