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
- DashStyle.cs
- ErrorReporting.cs
- storepermission.cs
- CacheEntry.cs
- UnsafeNativeMethods.cs
- CodeTypeOfExpression.cs
- XmlBinaryReader.cs
- RangeBaseAutomationPeer.cs
- Signature.cs
- FrameworkPropertyMetadata.cs
- IndexingContentUnit.cs
- ClearTypeHintValidation.cs
- objectresult_tresulttype.cs
- XmlSchemaSimpleTypeList.cs
- SystemColorTracker.cs
- Operators.cs
- CodeTypeConstructor.cs
- ScriptServiceAttribute.cs
- SqlStatistics.cs
- XmlSchemaSimpleType.cs
- OdbcParameterCollection.cs
- TreeView.cs
- AppDomain.cs
- DLinqDataModelProvider.cs
- WeakReferenceEnumerator.cs
- BinaryReader.cs
- DrawingVisualDrawingContext.cs
- _CacheStreams.cs
- SchemaObjectWriter.cs
- SizeF.cs
- DataStreams.cs
- UnsafeNativeMethods.cs
- XmlIgnoreAttribute.cs
- GPPOINT.cs
- DefaultValueAttribute.cs
- FragmentQueryKB.cs
- SurrogateDataContract.cs
- sqlnorm.cs
- AuthenticationModuleElementCollection.cs
- RegistrationServices.cs
- SequentialActivityDesigner.cs
- SignerInfo.cs
- CodeLabeledStatement.cs
- IsolatedStorageFileStream.cs
- CharConverter.cs
- ClusterSafeNativeMethods.cs
- XmlDataSource.cs
- DataGridViewButtonCell.cs
- PropertyItemInternal.cs
- XmlObjectSerializerReadContextComplexJson.cs
- FontEmbeddingManager.cs
- ToolStripPanelRenderEventArgs.cs
- ComponentManagerBroker.cs
- SecuritySessionFilter.cs
- XmlDataDocument.cs
- KeyPressEvent.cs
- ZipIORawDataFileBlock.cs
- WebBrowser.cs
- ContourSegment.cs
- TreeIterators.cs
- InstanceCompleteException.cs
- CompositeActivityCodeGenerator.cs
- Privilege.cs
- contentDescriptor.cs
- DataSetUtil.cs
- Paragraph.cs
- EDesignUtil.cs
- ServiceX509SecurityTokenProvider.cs
- TextComposition.cs
- BinHexEncoder.cs
- CLRBindingWorker.cs
- Tablet.cs
- ToolStripLabel.cs
- XmlElementElementCollection.cs
- ReaderWriterLockSlim.cs
- RegisteredExpandoAttribute.cs
- MetroSerializationManager.cs
- RemotingService.cs
- XmlDocumentFragment.cs
- CheckoutException.cs
- RuntimeWrappedException.cs
- LostFocusEventManager.cs
- TextContainer.cs
- OneOfConst.cs
- TypeElement.cs
- ViewDesigner.cs
- SafeLocalMemHandle.cs
- WmlFormAdapter.cs
- CharacterString.cs
- SurrogateDataContract.cs
- DeploymentSection.cs
- ContractAdapter.cs
- EnumMember.cs
- XmlArrayItemAttribute.cs
- WeakEventManager.cs
- ViewManager.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- odbcmetadatacollectionnames.cs
- ActivityTypeCodeDomSerializer.cs
- HealthMonitoringSectionHelper.cs