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
- Perspective.cs
- XmlHierarchyData.cs
- NamespaceQuery.cs
- ScrollData.cs
- ObjectManager.cs
- ProtocolImporter.cs
- HttpApplicationStateBase.cs
- Header.cs
- UserControlAutomationPeer.cs
- HostedBindingBehavior.cs
- SimpleTableProvider.cs
- LogManagementAsyncResult.cs
- TimeIntervalCollection.cs
- MouseEvent.cs
- ComponentGuaranteesAttribute.cs
- RelatedEnd.cs
- ConfigurationCollectionAttribute.cs
- Context.cs
- TransformCollection.cs
- BatchServiceHost.cs
- InkCanvasSelection.cs
- OdbcConnectionPoolProviderInfo.cs
- XmlWrappingReader.cs
- TraceInternal.cs
- ToolBar.cs
- XmlSignificantWhitespace.cs
- DataControlFieldCollection.cs
- AsyncResult.cs
- TargetPerspective.cs
- ObjectSecurityT.cs
- StrongNameUtility.cs
- XmlTypeAttribute.cs
- VisualBasicSettingsConverter.cs
- WebCategoryAttribute.cs
- SiteIdentityPermission.cs
- DocumentViewerBase.cs
- TextEncodedRawTextWriter.cs
- ProjectionPlanCompiler.cs
- XsltContext.cs
- WebContext.cs
- ThicknessKeyFrameCollection.cs
- LineGeometry.cs
- FlowDecision.cs
- ReadWriteObjectLock.cs
- PeerObject.cs
- SqlUtils.cs
- RoleGroupCollectionEditor.cs
- InlineObject.cs
- WindowsAltTab.cs
- MenuItemStyleCollection.cs
- XsdCachingReader.cs
- DetailsViewRow.cs
- TransformedBitmap.cs
- SchemaImporterExtension.cs
- HiddenField.cs
- SrgsRule.cs
- Screen.cs
- XPathChildIterator.cs
- SymLanguageType.cs
- TdsParser.cs
- PackUriHelper.cs
- DetailsViewDeleteEventArgs.cs
- _BasicClient.cs
- ColumnReorderedEventArgs.cs
- ObjectDisposedException.cs
- AttributeEmitter.cs
- SelectionRangeConverter.cs
- CriticalHandle.cs
- SecurityException.cs
- GenerateScriptTypeAttribute.cs
- WorkingDirectoryEditor.cs
- Publisher.cs
- WebPartConnectionsCancelVerb.cs
- CaseInsensitiveOrdinalStringComparer.cs
- Query.cs
- PowerStatus.cs
- HMACSHA1.cs
- Error.cs
- TableLayoutColumnStyleCollection.cs
- Positioning.cs
- PrintingPermissionAttribute.cs
- ComboBox.cs
- StructuredCompositeActivityDesigner.cs
- XLinq.cs
- DotAtomReader.cs
- EventProviderWriter.cs
- WpfXamlType.cs
- UInt64.cs
- ReferenceSchema.cs
- StateRuntime.cs
- TextElementEditingBehaviorAttribute.cs
- PasswordRecovery.cs
- MembershipValidatePasswordEventArgs.cs
- XmlSchemaAnnotated.cs
- AnnotationHelper.cs
- DeclaredTypeValidatorAttribute.cs
- PersistenceProviderDirectory.cs
- DrawingDrawingContext.cs
- XmlEntityReference.cs
- WorkflowExecutor.cs