Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / UserNamePasswordClientCredential.cs / 1 / UserNamePasswordClientCredential.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.Net;
using System.Security.Principal;
using System.ServiceModel.Security.Tokens;
using System.Security.Cryptography.X509Certificates;
using System.Web.Security;
public sealed class UserNamePasswordClientCredential
{
string userName;
string password;
bool isReadOnly;
internal UserNamePasswordClientCredential()
{
// empty
}
internal UserNamePasswordClientCredential(UserNamePasswordClientCredential other)
{
this.userName = other.userName;
this.password = other.password;
this.isReadOnly = other.isReadOnly;
}
public string UserName
{
get
{
return this.userName;
}
set
{
ThrowIfImmutable();
this.userName = value;
}
}
public string Password
{
get
{
return this.password;
}
set
{
ThrowIfImmutable();
this.password = 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
- RNGCryptoServiceProvider.cs
- ClientCredentialsElement.cs
- WebDescriptionAttribute.cs
- DataGridViewCellConverter.cs
- StateInitializationDesigner.cs
- XhtmlTextWriter.cs
- WeakRefEnumerator.cs
- CodeExpressionCollection.cs
- DbConnectionPoolGroup.cs
- Base64Stream.cs
- SqlCommandSet.cs
- LogManagementAsyncResult.cs
- AttachedPropertyMethodSelector.cs
- AutoCompleteStringCollection.cs
- MenuItemCollection.cs
- Activation.cs
- HtmlTableRow.cs
- DataTable.cs
- TemplateBamlRecordReader.cs
- AttachedAnnotation.cs
- KnownBoxes.cs
- arclist.cs
- CustomAssemblyResolver.cs
- WebPartZone.cs
- DataQuery.cs
- Point.cs
- BufferedStream.cs
- MessageSmuggler.cs
- StreamWithDictionary.cs
- GlyphRun.cs
- BooleanSwitch.cs
- MethodCallTranslator.cs
- InheritanceAttribute.cs
- TextEffect.cs
- XmlArrayItemAttributes.cs
- Size3DConverter.cs
- ProvideValueServiceProvider.cs
- OptimizedTemplateContentHelper.cs
- SystemFonts.cs
- BookmarkScopeInfo.cs
- BitmapEffectGroup.cs
- CodeNamespaceImportCollection.cs
- DbParameterCollectionHelper.cs
- TypeProvider.cs
- SQLMoneyStorage.cs
- RuleInfoComparer.cs
- MouseGestureConverter.cs
- Primitive.cs
- SqlLiftWhereClauses.cs
- PointConverter.cs
- Metafile.cs
- DataGridParentRows.cs
- linebase.cs
- Style.cs
- ApplicationTrust.cs
- InvalidPipelineStoreException.cs
- CompiledAction.cs
- altserialization.cs
- PageCatalogPart.cs
- XmlAtomErrorReader.cs
- SecurityUtils.cs
- SplitContainerDesigner.cs
- Quaternion.cs
- OleDbStruct.cs
- ItemsChangedEventArgs.cs
- RbTree.cs
- DesignBindingPicker.cs
- GetPageNumberCompletedEventArgs.cs
- AppDomainProtocolHandler.cs
- TreeView.cs
- MeasureData.cs
- BinaryFormatterWriter.cs
- DataServiceHostFactory.cs
- FileSystemEventArgs.cs
- ItemCheckedEvent.cs
- MetadataArtifactLoaderCompositeResource.cs
- fixedPageContentExtractor.cs
- HttpException.cs
- SeekableReadStream.cs
- SimpleHandlerBuildProvider.cs
- DataGridViewCellConverter.cs
- HttpResponse.cs
- SymbolTable.cs
- TransactionTraceIdentifier.cs
- XmlSchemaAttributeGroupRef.cs
- FontStyleConverter.cs
- WebPartConnectionsDisconnectVerb.cs
- StructuredType.cs
- AdRotatorDesigner.cs
- ProjectionCamera.cs
- LogManagementAsyncResult.cs
- SkipStoryboardToFill.cs
- PartBasedPackageProperties.cs
- DocumentViewerAutomationPeer.cs
- CompareValidator.cs
- TypeName.cs
- UpdatePanel.cs
- HitTestDrawingContextWalker.cs
- ExpressionEditorAttribute.cs
- NamespaceDecl.cs