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
- DataServiceQueryException.cs
- BinaryOperationBinder.cs
- StringArrayEditor.cs
- GuidTagList.cs
- ExitEventArgs.cs
- SqlDataRecord.cs
- GiveFeedbackEventArgs.cs
- Switch.cs
- GradientSpreadMethodValidation.cs
- FlowNode.cs
- ServiceNameElement.cs
- XmlLangPropertyAttribute.cs
- GenericsNotImplementedException.cs
- ContentControl.cs
- ElementsClipboardData.cs
- ZipArchive.cs
- ConfigurationSection.cs
- XmlLanguage.cs
- ScrollBar.cs
- _NestedMultipleAsyncResult.cs
- RangeEnumerable.cs
- NumberFormatInfo.cs
- SeparatorAutomationPeer.cs
- ScriptReferenceBase.cs
- FlowLayout.cs
- InteropExecutor.cs
- ProcessHostServerConfig.cs
- AssociatedControlConverter.cs
- NominalTypeEliminator.cs
- StickyNoteHelper.cs
- DocumentViewerBaseAutomationPeer.cs
- PropertyCondition.cs
- QuestionEventArgs.cs
- Clock.cs
- TimeStampChecker.cs
- DelegateSerializationHolder.cs
- ServiceHostingEnvironment.cs
- SHA1.cs
- TextWriterEngine.cs
- PackageDigitalSignatureManager.cs
- MessageLogger.cs
- SequentialWorkflowRootDesigner.cs
- CatalogZone.cs
- DoubleLinkList.cs
- CodeAttachEventStatement.cs
- CanonicalFormWriter.cs
- RequestCacheManager.cs
- AutomationPropertyInfo.cs
- DynamicObjectAccessor.cs
- DetailsViewPagerRow.cs
- BookmarkManager.cs
- BindingSource.cs
- EmissiveMaterial.cs
- RepeaterItem.cs
- RangeValidator.cs
- DataGridViewControlCollection.cs
- ApplicationServiceManager.cs
- OledbConnectionStringbuilder.cs
- XamlFigureLengthSerializer.cs
- ErrorRuntimeConfig.cs
- ShutDownListener.cs
- InkCanvasInnerCanvas.cs
- ZoneMembershipCondition.cs
- PeerTransportBindingElement.cs
- DataGridViewAccessibleObject.cs
- CacheOutputQuery.cs
- OracleLob.cs
- MailAddressCollection.cs
- LostFocusEventManager.cs
- FixedSOMLineCollection.cs
- Ref.cs
- IRCollection.cs
- securestring.cs
- Rule.cs
- ReferenceTypeElement.cs
- transactioncontext.cs
- ConnectionPointGlyph.cs
- Flowchart.cs
- RealProxy.cs
- DataGridViewColumn.cs
- ASCIIEncoding.cs
- CharEntityEncoderFallback.cs
- WindowsTitleBar.cs
- ManagedIStream.cs
- ProtectedConfiguration.cs
- ThreadExceptionEvent.cs
- X500Name.cs
- CfgParser.cs
- XmlLanguage.cs
- StringInfo.cs
- SchemaExporter.cs
- AmbientValueAttribute.cs
- HandlerBase.cs
- UnmanagedMemoryAccessor.cs
- SqlException.cs
- TextViewSelectionProcessor.cs
- DesignerUtility.cs
- HeaderUtility.cs
- ImportDesigner.xaml.cs
- DataPager.cs