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
- COM2ExtendedTypeConverter.cs
- HyperLink.cs
- SoapCommonClasses.cs
- GZipStream.cs
- DelegatingMessage.cs
- SamlAuthenticationStatement.cs
- DirectoryObjectSecurity.cs
- XmlComplianceUtil.cs
- SuppressIldasmAttribute.cs
- InstanceView.cs
- BindingListCollectionView.cs
- SBCSCodePageEncoding.cs
- DesignerActionKeyboardBehavior.cs
- StrongNameKeyPair.cs
- BinaryWriter.cs
- ReceiveSecurityHeaderEntry.cs
- ColumnResult.cs
- HtmlImage.cs
- OletxDependentTransaction.cs
- MeasureItemEvent.cs
- ContentWrapperAttribute.cs
- UnsafeNativeMethodsTablet.cs
- xamlnodes.cs
- SelectionService.cs
- IndexOutOfRangeException.cs
- wgx_sdk_version.cs
- OdbcEnvironment.cs
- SignatureToken.cs
- FamilyMap.cs
- SqlGenerator.cs
- TreeNodeSelectionProcessor.cs
- BitmapEncoder.cs
- DbConnectionClosed.cs
- TreeView.cs
- Converter.cs
- KnownColorTable.cs
- LoginNameDesigner.cs
- ReadOnlyDataSourceView.cs
- SecurityUniqueId.cs
- DateTimeFormat.cs
- ContainerControlDesigner.cs
- DataGridViewCheckBoxColumn.cs
- AttachedAnnotation.cs
- Identity.cs
- odbcmetadatacolumnnames.cs
- WizardStepBase.cs
- DbConnectionFactory.cs
- VisualStateChangedEventArgs.cs
- ViewKeyConstraint.cs
- XmlnsCompatibleWithAttribute.cs
- OleDbCommandBuilder.cs
- MappingMetadataHelper.cs
- BufferManager.cs
- SchemaObjectWriter.cs
- ResourceSet.cs
- RowUpdatingEventArgs.cs
- ResourceContainer.cs
- DataContext.cs
- ListMarkerLine.cs
- HashCodeCombiner.cs
- DBSchemaRow.cs
- FrameworkElementFactoryMarkupObject.cs
- NativeBuffer.cs
- ArraySortHelper.cs
- BitmapScalingModeValidation.cs
- Message.cs
- DependencyObjectType.cs
- PasswordTextContainer.cs
- NavigationWindowAutomationPeer.cs
- SingleAnimationUsingKeyFrames.cs
- Attributes.cs
- RotateTransform.cs
- StackOverflowException.cs
- _Events.cs
- DBSqlParserTable.cs
- HtmlToClrEventProxy.cs
- Compiler.cs
- QueryOutputWriter.cs
- LowerCaseStringConverter.cs
- GenericIdentity.cs
- ImpersonateTokenRef.cs
- RankException.cs
- CollectionViewGroupInternal.cs
- Rule.cs
- TextEditor.cs
- ProfilePropertyNameValidator.cs
- DispatcherProcessingDisabled.cs
- AbstractSvcMapFileLoader.cs
- PropertyNames.cs
- BindUriHelper.cs
- DefaultPropertiesToSend.cs
- KnownIds.cs
- WebPartCollection.cs
- ApplicationDirectory.cs
- DataGridViewCellParsingEventArgs.cs
- HttpConfigurationSystem.cs
- HMACRIPEMD160.cs
- PropertyValueChangedEvent.cs
- ComplexPropertyEntry.cs
- ThreadStaticAttribute.cs