Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / FormsAuthenticationUser.cs / 2 / FormsAuthenticationUser.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*****************************************************************************
From machine.config
******************************************************************************/
namespace System.Web.Configuration {
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Text;
using System.Web.Util;
using System.ComponentModel;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class FormsAuthenticationUser : ConfigurationElement {
private static ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propName =
new ConfigurationProperty("name",
typeof(string),
"",
new LowerCaseStringConverter(),
null,
ConfigurationPropertyOptions.IsRequired |
ConfigurationPropertyOptions.IsKey);
private static readonly ConfigurationProperty _propPassword =
new ConfigurationProperty("password",
typeof(string),
"",
ConfigurationPropertyOptions.IsRequired);
static FormsAuthenticationUser() {
// Property initialization
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propName);
_properties.Add(_propPassword);
}
internal FormsAuthenticationUser() {
}
public FormsAuthenticationUser(String name, String password)
: this() {
Name = name.ToLower(CultureInfo.InvariantCulture);
Password = password;
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("name", IsRequired = true, IsKey = true, DefaultValue = "")]
[TypeConverter(typeof(LowerCaseStringConverter))]
[StringValidator()]
public string Name {
get {
return (string)base[_propName];
}
set {
base[_propName] = value;
}
}
[ConfigurationProperty("password", IsRequired = true, DefaultValue = "")]
[StringValidator()]
public string Password {
get {
return (string)base[_propPassword];
}
set {
base[_propPassword] = value;
}
}
} // class FormsAuthenticationUser
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*****************************************************************************
From machine.config
******************************************************************************/
namespace System.Web.Configuration {
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Text;
using System.Web.Util;
using System.ComponentModel;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class FormsAuthenticationUser : ConfigurationElement {
private static ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propName =
new ConfigurationProperty("name",
typeof(string),
"",
new LowerCaseStringConverter(),
null,
ConfigurationPropertyOptions.IsRequired |
ConfigurationPropertyOptions.IsKey);
private static readonly ConfigurationProperty _propPassword =
new ConfigurationProperty("password",
typeof(string),
"",
ConfigurationPropertyOptions.IsRequired);
static FormsAuthenticationUser() {
// Property initialization
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propName);
_properties.Add(_propPassword);
}
internal FormsAuthenticationUser() {
}
public FormsAuthenticationUser(String name, String password)
: this() {
Name = name.ToLower(CultureInfo.InvariantCulture);
Password = password;
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("name", IsRequired = true, IsKey = true, DefaultValue = "")]
[TypeConverter(typeof(LowerCaseStringConverter))]
[StringValidator()]
public string Name {
get {
return (string)base[_propName];
}
set {
base[_propName] = value;
}
}
[ConfigurationProperty("password", IsRequired = true, DefaultValue = "")]
[StringValidator()]
public string Password {
get {
return (string)base[_propPassword];
}
set {
base[_propPassword] = value;
}
}
} // class FormsAuthenticationUser
}
// 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
- CurrentChangedEventManager.cs
- HtmlTableCell.cs
- NativeMethods.cs
- DesignerCapabilities.cs
- OpenFileDialog.cs
- ServicePointManager.cs
- BuildResult.cs
- SoapAttributeAttribute.cs
- SizeConverter.cs
- ServiceOperationParameter.cs
- Encoder.cs
- ClientTarget.cs
- TextEndOfSegment.cs
- _CommandStream.cs
- UnionCqlBlock.cs
- TargetConverter.cs
- TableLayoutStyle.cs
- adornercollection.cs
- HotCommands.cs
- TextPointer.cs
- EastAsianLunisolarCalendar.cs
- PerformanceCountersElement.cs
- TemplateBaseAction.cs
- LogFlushAsyncResult.cs
- AssemblyAttributesGoHere.cs
- TargetParameterCountException.cs
- Vector3DAnimation.cs
- WebCodeGenerator.cs
- Substitution.cs
- MetricEntry.cs
- EntityContainer.cs
- ScriptIgnoreAttribute.cs
- ReadOnlyPropertyMetadata.cs
- DSASignatureFormatter.cs
- SelectionRangeConverter.cs
- Rectangle.cs
- DrawingGroupDrawingContext.cs
- AppDomain.cs
- SafeCryptContextHandle.cs
- PlanCompilerUtil.cs
- Schema.cs
- ObjectListFieldsPage.cs
- CreatingCookieEventArgs.cs
- SqlClientMetaDataCollectionNames.cs
- WorkflowMarkupSerializationManager.cs
- SafeNativeMethodsMilCoreApi.cs
- StringConcat.cs
- SmiContextFactory.cs
- BezierSegment.cs
- GenericTypeParameterBuilder.cs
- FlowchartStart.xaml.cs
- LocationFactory.cs
- XamlTypeMapper.cs
- ZipPackage.cs
- DataServiceHost.cs
- HwndTarget.cs
- DSASignatureDeformatter.cs
- SqlNode.cs
- _NegoState.cs
- WebProxyScriptElement.cs
- UnionExpr.cs
- UnaryNode.cs
- ResourcePart.cs
- WindowsTokenRoleProvider.cs
- NativeMethods.cs
- FixedHighlight.cs
- SchemaElement.cs
- UrlMappingsSection.cs
- DataSourceView.cs
- SortedDictionary.cs
- DictionaryEntry.cs
- SqlGatherProducedAliases.cs
- InvariantComparer.cs
- WSSecureConversationFeb2005.cs
- QueryRewriter.cs
- LexicalChunk.cs
- ClientSettingsSection.cs
- ScrollItemProviderWrapper.cs
- CollectionBuilder.cs
- FindResponse.cs
- SQLStringStorage.cs
- RunWorkerCompletedEventArgs.cs
- ScriptManagerProxy.cs
- CanExecuteRoutedEventArgs.cs
- ContentValidator.cs
- HeaderedContentControl.cs
- Win32.cs
- CompositeDuplexElement.cs
- LockRecoveryTask.cs
- TcpStreams.cs
- PenContexts.cs
- Random.cs
- DockAndAnchorLayout.cs
- ActiveXContainer.cs
- CacheMemory.cs
- TemplateColumn.cs
- FrameworkElementFactory.cs
- CodeRegionDirective.cs
- ISessionStateStore.cs
- CommandConverter.cs