Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / HttpDigestClientCredential.cs / 1 / HttpDigestClientCredential.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security { using System.Collections.Generic; using System.ServiceModel; using System.Runtime.Serialization; using System.ServiceModel.Security; using System.Net; using System.Security.Principal; using System.ServiceModel.Security.Tokens; using System.Security.Cryptography.X509Certificates; using System.Web.Security; public sealed class HttpDigestClientCredential { TokenImpersonationLevel allowedImpersonationLevel = WindowsClientCredential.DefaultImpersonationLevel; NetworkCredential digestCredentials; bool isReadOnly; internal HttpDigestClientCredential() { this.digestCredentials = new NetworkCredential(); } internal HttpDigestClientCredential(HttpDigestClientCredential other) { this.allowedImpersonationLevel = other.allowedImpersonationLevel; this.digestCredentials = SecurityUtils.GetNetworkCredentialsCopy(other.digestCredentials); this.isReadOnly = other.isReadOnly; } public TokenImpersonationLevel AllowedImpersonationLevel { get { return this.allowedImpersonationLevel; } set { ThrowIfImmutable(); this.allowedImpersonationLevel = value; } } public NetworkCredential ClientCredential { get { return this.digestCredentials; } set { ThrowIfImmutable(); this.digestCredentials = value; } } internal void MakeReadOnly() { this.isReadOnly = true; } void ThrowIfImmutable() { if (this.isReadOnly) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.ObjectIsReadOnly))); } } } } // 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
- CdpEqualityComparer.cs
- RecordsAffectedEventArgs.cs
- AsymmetricAlgorithm.cs
- ApplicationHost.cs
- ToolStripDropDownItem.cs
- TableRow.cs
- PropertyIdentifier.cs
- TemplateBindingExtensionConverter.cs
- WorkflowApplication.cs
- Compiler.cs
- ThreadNeutralSemaphore.cs
- DataGridDesigner.cs
- HotSpot.cs
- PropertyFilterAttribute.cs
- UnaryQueryOperator.cs
- LinqDataSourceContextEventArgs.cs
- InteropAutomationProvider.cs
- CreateUserWizardDesigner.cs
- IOException.cs
- ipaddressinformationcollection.cs
- ExtendedTransformFactory.cs
- UnsafeNativeMethods.cs
- TextProperties.cs
- SqlDataSourceTableQuery.cs
- XmlValueConverter.cs
- _LocalDataStoreMgr.cs
- MethodCallExpression.cs
- IdentitySection.cs
- CompensateDesigner.cs
- ToolStripMenuItem.cs
- UnmanagedMarshal.cs
- CTreeGenerator.cs
- RoleManagerSection.cs
- ToolStripItemEventArgs.cs
- InputManager.cs
- DrawListViewSubItemEventArgs.cs
- SqlCommandBuilder.cs
- UnsafeMethods.cs
- VisualStateChangedEventArgs.cs
- ContainerControlDesigner.cs
- DataDocumentXPathNavigator.cs
- HttpModuleAction.cs
- XamlGridLengthSerializer.cs
- ConnectorSelectionGlyph.cs
- CodeVariableDeclarationStatement.cs
- ResourcesChangeInfo.cs
- Flattener.cs
- RayHitTestParameters.cs
- JsonUriDataContract.cs
- OracleDataAdapter.cs
- DataKey.cs
- XmlIlTypeHelper.cs
- CompositionAdorner.cs
- ExpandSegmentCollection.cs
- WebZone.cs
- Camera.cs
- SmtpSection.cs
- XslNumber.cs
- GlobalProxySelection.cs
- GACIdentityPermission.cs
- FileSystemWatcher.cs
- AuthenticatedStream.cs
- wmiprovider.cs
- KeyMatchBuilder.cs
- StateFinalizationDesigner.cs
- HostProtectionPermission.cs
- PageContentCollection.cs
- TextTreeTextBlock.cs
- ByteKeyFrameCollection.cs
- AttachedPropertyBrowsableAttribute.cs
- AssertFilter.cs
- AddingNewEventArgs.cs
- RetriableClipboard.cs
- Fonts.cs
- RsaSecurityToken.cs
- ChildDocumentBlock.cs
- SocketInformation.cs
- ServiceDescriptions.cs
- TransmissionStrategy.cs
- RealizationContext.cs
- Encoder.cs
- LayoutSettings.cs
- HandlerFactoryWrapper.cs
- ReferencedAssembly.cs
- OlePropertyStructs.cs
- JsonFormatMapping.cs
- ImplicitInputBrush.cs
- XmlCDATASection.cs
- WebBrowserHelper.cs
- WindowsAuthenticationEventArgs.cs
- ExtensionDataReader.cs
- XmlWellformedWriter.cs
- JsonWriterDelegator.cs
- ByteStorage.cs
- StickyNoteAnnotations.cs
- DataGridClipboardHelper.cs
- TextEndOfParagraph.cs
- Utils.cs
- EncryptedKeyIdentifierClause.cs
- HttpConfigurationContext.cs