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
- EventSource.cs
- CellConstant.cs
- BaseCAMarshaler.cs
- MergablePropertyAttribute.cs
- LocalizedNameDescriptionPair.cs
- SoapElementAttribute.cs
- FullTextBreakpoint.cs
- OdbcConnection.cs
- Configuration.cs
- WorkerRequest.cs
- HtmlTableCell.cs
- ResizeGrip.cs
- ModelFunctionTypeElement.cs
- isolationinterop.cs
- RowVisual.cs
- CodeGeneratorOptions.cs
- LinearGradientBrush.cs
- RegularExpressionValidator.cs
- COM2IDispatchConverter.cs
- AssemblyName.cs
- BlobPersonalizationState.cs
- ConfigXmlReader.cs
- StrokeFIndices.cs
- PatternMatcher.cs
- ComponentChangingEvent.cs
- DesignerHost.cs
- ChtmlImageAdapter.cs
- DecimalFormatter.cs
- DataGridViewRowsAddedEventArgs.cs
- TypeContext.cs
- HostingEnvironmentException.cs
- TextEndOfParagraph.cs
- ImageKeyConverter.cs
- Util.cs
- ProxyWebPart.cs
- TaskFileService.cs
- XPathParser.cs
- LicenseProviderAttribute.cs
- TextBoxBase.cs
- DynamicAttribute.cs
- EntityDataSourceConfigureObjectContext.cs
- LinkConverter.cs
- XhtmlTextWriter.cs
- PromptBuilder.cs
- AnimationException.cs
- CheckBoxPopupAdapter.cs
- WebBrowserContainer.cs
- ChoiceConverter.cs
- ExpandCollapsePattern.cs
- Stream.cs
- PropertyConverter.cs
- ConvertersCollection.cs
- PanelDesigner.cs
- Container.cs
- EventDescriptor.cs
- DictionaryEntry.cs
- XsltLibrary.cs
- XmlNullResolver.cs
- BrowserTree.cs
- UriScheme.cs
- WebPartUtil.cs
- CompilerTypeWithParams.cs
- CustomValidator.cs
- DataGridRelationshipRow.cs
- BindingElementCollection.cs
- HtmlShimManager.cs
- RegexParser.cs
- ResourceDefaultValueAttribute.cs
- DataGridViewAutoSizeModeEventArgs.cs
- TCPListener.cs
- DependencyPropertyConverter.cs
- TableLayoutCellPaintEventArgs.cs
- SafeSystemMetrics.cs
- ExpandSegmentCollection.cs
- CursorInteropHelper.cs
- WpfXamlLoader.cs
- ValidatingPropertiesEventArgs.cs
- Pair.cs
- SafeCryptoHandles.cs
- DataPointer.cs
- Triangle.cs
- WebPartCatalogCloseVerb.cs
- BindMarkupExtensionSerializer.cs
- DetailsViewCommandEventArgs.cs
- SmiGettersStream.cs
- StatusBarDrawItemEvent.cs
- Crypto.cs
- BamlReader.cs
- CodeAttachEventStatement.cs
- ThreadStaticAttribute.cs
- InfoCardRSACryptoProvider.cs
- DragAssistanceManager.cs
- BehaviorEditorPart.cs
- ConfigurationSectionGroupCollection.cs
- ParallelForEach.cs
- SecurityCredentialsManager.cs
- X509Extension.cs
- Tokenizer.cs
- BaseTemplateParser.cs
- HwndSubclass.cs