Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / ProfilePropertyNameValidator.cs / 1305376 / ProfilePropertyNameValidator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; internal sealed class ProfilePropertyNameValidator : ConfigurationValidatorBase { public override bool CanValidate(Type type) { return (type == typeof(string)); } public override void Validate(object value) { if (value == null) { throw new ArgumentNullException("value"); } string s = value as string; if (s != null) { s = s.Trim(); } if (string.IsNullOrEmpty(s)) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_be_empty)); } if (s.Contains(".")) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_contain_period)); } } internal static ProfilePropertyNameValidator SingletonInstance = new ProfilePropertyNameValidator(); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; internal sealed class ProfilePropertyNameValidator : ConfigurationValidatorBase { public override bool CanValidate(Type type) { return (type == typeof(string)); } public override void Validate(object value) { if (value == null) { throw new ArgumentNullException("value"); } string s = value as string; if (s != null) { s = s.Trim(); } if (string.IsNullOrEmpty(s)) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_be_empty)); } if (s.Contains(".")) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_contain_period)); } } internal static ProfilePropertyNameValidator SingletonInstance = new ProfilePropertyNameValidator(); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComMethodElement.cs
- ManagedIStream.cs
- XamlReader.cs
- ActivationServices.cs
- DoubleCollection.cs
- AutomationPatternInfo.cs
- ListSortDescriptionCollection.cs
- CreateParams.cs
- wgx_sdk_version.cs
- SmiContext.cs
- NamedElement.cs
- Fx.cs
- TableLayoutSettings.cs
- DataServiceRequestException.cs
- CornerRadius.cs
- ModuleBuilder.cs
- VirtualDirectoryMapping.cs
- UnhandledExceptionEventArgs.cs
- ProfilePropertySettingsCollection.cs
- MemberInitExpression.cs
- SQLBinary.cs
- ListBox.cs
- MouseButton.cs
- UTF8Encoding.cs
- BufferAllocator.cs
- ScrollItemPattern.cs
- MultipleViewPatternIdentifiers.cs
- MappingMetadataHelper.cs
- DefaultBindingPropertyAttribute.cs
- TypedTableHandler.cs
- ComponentDispatcher.cs
- ResXResourceWriter.cs
- WindowsTab.cs
- PersistenceTypeAttribute.cs
- BoundsDrawingContextWalker.cs
- wmiprovider.cs
- StubHelpers.cs
- ChangeNode.cs
- ResolveNextArgumentWorkItem.cs
- ConsoleKeyInfo.cs
- WindowsTokenRoleProvider.cs
- ValidationPropertyAttribute.cs
- ViewGenResults.cs
- Imaging.cs
- DataViewSetting.cs
- ClientProxyGenerator.cs
- SimpleType.cs
- DataGridItemEventArgs.cs
- SweepDirectionValidation.cs
- SecurityCriticalDataForSet.cs
- SerializationAttributes.cs
- HtmlTitle.cs
- RadioButtonAutomationPeer.cs
- ProviderCommandInfoUtils.cs
- Query.cs
- VarInfo.cs
- XmlSchemaRedefine.cs
- ReadOnlyDictionary.cs
- HtmlInputReset.cs
- XmlCharCheckingReader.cs
- LogWriteRestartAreaAsyncResult.cs
- GridViewRow.cs
- ItemCollection.cs
- ObjectDataSourceDesigner.cs
- DCSafeHandle.cs
- IntMinMaxAggregationOperator.cs
- SqlDataSourceCache.cs
- FontFamily.cs
- ErrorWebPart.cs
- OAVariantLib.cs
- PtsHost.cs
- GregorianCalendarHelper.cs
- PrintDialog.cs
- XmlDataLoader.cs
- TriggerBase.cs
- TextWriterEngine.cs
- WindowsPen.cs
- TranslateTransform3D.cs
- SqlConnectionHelper.cs
- CursorConverter.cs
- Tablet.cs
- ConnectionProviderAttribute.cs
- ProviderCollection.cs
- TimeSpanMinutesConverter.cs
- TypeForwardedToAttribute.cs
- Invariant.cs
- UnaryNode.cs
- ErrorStyle.cs
- ScrollData.cs
- BaseConfigurationRecord.cs
- XmlQueryType.cs
- Overlapped.cs
- ProxyHelper.cs
- XomlDesignerLoader.cs
- MenuRendererClassic.cs
- StylusPointCollection.cs
- DesignerFrame.cs
- IdentityHolder.cs
- AssemblyNameProxy.cs
- Literal.cs