Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- SiteMapNodeItemEventArgs.cs
- ListQueryResults.cs
- ImportContext.cs
- TemplateBindingExpressionConverter.cs
- ManagementOperationWatcher.cs
- AdCreatedEventArgs.cs
- DtdParser.cs
- OutputCacheModule.cs
- ErrorTableItemStyle.cs
- ObjectDataSourceDisposingEventArgs.cs
- mediaclock.cs
- SqlDataRecord.cs
- BuildProvider.cs
- FormDocumentDesigner.cs
- HtmlTableCellCollection.cs
- Dispatcher.cs
- MLangCodePageEncoding.cs
- ConnectionOrientedTransportChannelListener.cs
- SiteMapPath.cs
- DiffuseMaterial.cs
- ValidationPropertyAttribute.cs
- dataSvcMapFileLoader.cs
- ExpressionParser.cs
- ContentPlaceHolder.cs
- DurableInstanceManager.cs
- XmlAttribute.cs
- DynamicDiscoSearcher.cs
- TabControlCancelEvent.cs
- CollectionChangeEventArgs.cs
- NonClientArea.cs
- ToolZone.cs
- HMAC.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- AggregationMinMaxHelpers.cs
- AttachedAnnotationChangedEventArgs.cs
- ScrollProperties.cs
- CoTaskMemSafeHandle.cs
- XmlCompatibilityReader.cs
- DesignerProperties.cs
- RoleManagerModule.cs
- AuthenticationConfig.cs
- MatrixCamera.cs
- DataKey.cs
- WindowsRebar.cs
- EntityDataSourceUtil.cs
- TabItemWrapperAutomationPeer.cs
- AutomationIdentifierGuids.cs
- ScrollBar.cs
- HttpApplicationStateBase.cs
- ServicesUtilities.cs
- DomainConstraint.cs
- TriggerAction.cs
- StringConcat.cs
- AccessibleObject.cs
- SoapInteropTypes.cs
- URLString.cs
- ProfileParameter.cs
- RightsManagementPermission.cs
- IdentitySection.cs
- EntitySqlException.cs
- SrgsGrammarCompiler.cs
- recordstatescratchpad.cs
- GridViewSelectEventArgs.cs
- TrustManagerMoreInformation.cs
- SqlStatistics.cs
- ComplexObject.cs
- TableLayoutPanelCellPosition.cs
- UIElement.cs
- ColumnClickEvent.cs
- SequenceRange.cs
- LinqMaximalSubtreeNominator.cs
- HotSpot.cs
- PagePropertiesChangingEventArgs.cs
- ParallelEnumerableWrapper.cs
- BamlLocalizableResourceKey.cs
- StylusPointCollection.cs
- LinkLabel.cs
- NameValuePair.cs
- SecurityRuntime.cs
- RouteItem.cs
- AlgoModule.cs
- OrCondition.cs
- HTTPNotFoundHandler.cs
- EventLogPropertySelector.cs
- DebugHandleTracker.cs
- OracleRowUpdatedEventArgs.cs
- OciLobLocator.cs
- Privilege.cs
- Item.cs
- DrawToolTipEventArgs.cs
- SchemaInfo.cs
- ProvidersHelper.cs
- MediaSystem.cs
- ProfilePropertySettings.cs
- ExtendedProtectionPolicyElement.cs
- GeneralTransform.cs
- HelpEvent.cs
- MessageSecurityVersion.cs
- PrintPreviewControl.cs
- XmlTextReaderImpl.cs