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
- LineUtil.cs
- QilSortKey.cs
- SqlServer2KCompatibilityAnnotation.cs
- GetIndexBinder.cs
- CodePageUtils.cs
- ExitEventArgs.cs
- OleDbInfoMessageEvent.cs
- BaseCodeDomTreeGenerator.cs
- CrossSiteScriptingValidation.cs
- IListConverters.cs
- ResXResourceSet.cs
- SplineKeyFrames.cs
- HtmlHistory.cs
- WsdlHelpGeneratorElement.cs
- Token.cs
- TreeViewEvent.cs
- PolyBezierSegmentFigureLogic.cs
- DynamicILGenerator.cs
- UniformGrid.cs
- TraceFilter.cs
- DataListDesigner.cs
- StackSpiller.Generated.cs
- DataServiceQueryProvider.cs
- _NtlmClient.cs
- TextEditorSelection.cs
- ToggleButton.cs
- ProfileManager.cs
- DocumentPageHost.cs
- DbProviderFactoriesConfigurationHandler.cs
- RunWorkerCompletedEventArgs.cs
- securestring.cs
- SafeTimerHandle.cs
- SystemIPInterfaceStatistics.cs
- FtpCachePolicyElement.cs
- SafeTimerHandle.cs
- OverrideMode.cs
- CheckBoxBaseAdapter.cs
- PointIndependentAnimationStorage.cs
- Parameter.cs
- LogicalTreeHelper.cs
- TextElementAutomationPeer.cs
- FrameAutomationPeer.cs
- OverlappedContext.cs
- TextDpi.cs
- followingsibling.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ConstructorNeedsTagAttribute.cs
- TextRunTypographyProperties.cs
- SqlComparer.cs
- HostedAspNetEnvironment.cs
- DeferrableContent.cs
- SecurityUtils.cs
- Floater.cs
- ReadOnlyDataSource.cs
- WebPartCollection.cs
- CurrentTimeZone.cs
- VBIdentifierDesigner.xaml.cs
- TextContainer.cs
- ExpressionVisitor.cs
- QueueProcessor.cs
- MultipartContentParser.cs
- CodeSnippetTypeMember.cs
- FormatException.cs
- ThreadInterruptedException.cs
- EntityViewGenerator.cs
- KeyGestureConverter.cs
- PasswordPropertyTextAttribute.cs
- XmlSchemaAnnotated.cs
- ColumnPropertiesGroup.cs
- FormClosingEvent.cs
- DurationConverter.cs
- Listbox.cs
- InstancePersistenceCommandException.cs
- OpenFileDialog.cs
- Relationship.cs
- SR.cs
- LockRecursionException.cs
- ValueOfAction.cs
- FormViewModeEventArgs.cs
- QuaternionValueSerializer.cs
- OrCondition.cs
- shaperfactoryquerycachekey.cs
- FontSourceCollection.cs
- Rights.cs
- ReceiveActivity.cs
- SingletonInstanceContextProvider.cs
- TransformerInfoCollection.cs
- RemoveStoryboard.cs
- ParserStreamGeometryContext.cs
- LocatorPart.cs
- SecurityTokenAuthenticator.cs
- TreeNodeCollectionEditorDialog.cs
- ServicePrincipalNameElement.cs
- StructuredTypeEmitter.cs
- RoleManagerModule.cs
- odbcmetadatacollectionnames.cs
- XPathNodeList.cs
- ClientRuntimeConfig.cs
- SmiContext.cs
- WebPartVerb.cs