Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / ProfilePropertyNameValidator.cs / 1 / 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
- DatePickerDateValidationErrorEventArgs.cs
- TypeSystem.cs
- QueryOpeningEnumerator.cs
- SoapMessage.cs
- MetadataException.cs
- SmtpReplyReader.cs
- DataStreams.cs
- StorageTypeMapping.cs
- SoapCommonClasses.cs
- filewebrequest.cs
- _CookieModule.cs
- Rfc2898DeriveBytes.cs
- JournalNavigationScope.cs
- login.cs
- SystemIPv6InterfaceProperties.cs
- EventBuilder.cs
- HtmlLabelAdapter.cs
- TextPattern.cs
- HttpWriter.cs
- DebugView.cs
- SystemIcmpV4Statistics.cs
- HttpEncoder.cs
- MessageQueueTransaction.cs
- ObjectDataSourceSelectingEventArgs.cs
- ServiceContractGenerator.cs
- PropertyTabAttribute.cs
- ColumnProvider.cs
- SqlRetyper.cs
- XmlQueryCardinality.cs
- FileFormatException.cs
- CustomTokenProvider.cs
- CurrentChangingEventManager.cs
- GenericsInstances.cs
- DependencyPropertyConverter.cs
- SharedDp.cs
- DiffuseMaterial.cs
- Win32Native.cs
- BitmapCache.cs
- SqlExpressionNullability.cs
- ConfigurationSectionGroupCollection.cs
- SafeViewOfFileHandle.cs
- EventWaitHandle.cs
- ExecutionContext.cs
- StatusBarPanelClickEvent.cs
- DomainConstraint.cs
- XmlSchemaValidator.cs
- RegexWriter.cs
- DesignTimeValidationFeature.cs
- DataBinding.cs
- DataGridViewCellValidatingEventArgs.cs
- AppSettingsExpressionBuilder.cs
- DataDesignUtil.cs
- InvokePattern.cs
- Span.cs
- Descriptor.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- SystemFonts.cs
- EntityDataSourceQueryBuilder.cs
- CanonicalFormWriter.cs
- SmtpMail.cs
- MessageDecoder.cs
- RefreshInfo.cs
- oledbconnectionstring.cs
- TableLayoutColumnStyleCollection.cs
- OdbcRowUpdatingEvent.cs
- SocketCache.cs
- XmlBinaryWriter.cs
- SqlColumnizer.cs
- Selection.cs
- JsonServiceDocumentSerializer.cs
- CqlWriter.cs
- _ServiceNameStore.cs
- DeclaredTypeValidatorAttribute.cs
- SqlProfileProvider.cs
- DesignerActionHeaderItem.cs
- PageContentAsyncResult.cs
- NetworkCredential.cs
- FileNotFoundException.cs
- Scalars.cs
- ByeMessage11.cs
- PathFigureCollection.cs
- DataShape.cs
- TypefaceCollection.cs
- BindingCollection.cs
- ReflectionServiceProvider.cs
- JsonByteArrayDataContract.cs
- Transform.cs
- DataKey.cs
- TypeUsage.cs
- Expressions.cs
- StringOutput.cs
- Clock.cs
- LocationUpdates.cs
- ListenDesigner.cs
- XmlCharType.cs
- IMembershipProvider.cs
- Types.cs
- Brushes.cs
- OuterProxyWrapper.cs
- EmptyElement.cs