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
- Light.cs
- BitmapDecoder.cs
- BatchWriter.cs
- ServiceDesigner.cs
- TrustManagerPromptUI.cs
- VisualStyleInformation.cs
- RowBinding.cs
- UIElement.cs
- LiteralTextParser.cs
- XamlFigureLengthSerializer.cs
- WebPartDescription.cs
- FilteredAttributeCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- TargetInvocationException.cs
- FormsAuthenticationConfiguration.cs
- CryptoApi.cs
- RadioButtonAutomationPeer.cs
- TextEditorCopyPaste.cs
- ControlsConfig.cs
- OracleRowUpdatedEventArgs.cs
- UInt16Converter.cs
- ForeignConstraint.cs
- TraceUtils.cs
- SecurityElement.cs
- ICollection.cs
- TraceListener.cs
- WmlListAdapter.cs
- WebControlsSection.cs
- ImageListImage.cs
- Quaternion.cs
- RepeaterCommandEventArgs.cs
- HtmlInputRadioButton.cs
- AncestorChangedEventArgs.cs
- MeasurementDCInfo.cs
- Internal.cs
- DataStreams.cs
- SqlDataSourceTableQuery.cs
- ASCIIEncoding.cs
- String.cs
- WebPartPersonalization.cs
- OdbcParameterCollection.cs
- ReadContentAsBinaryHelper.cs
- WebPartConnectionsEventArgs.cs
- RPIdentityRequirement.cs
- PackWebRequestFactory.cs
- MetaTable.cs
- TimeZone.cs
- wgx_sdk_version.cs
- handlecollector.cs
- XmlReflectionMember.cs
- CacheSection.cs
- SqlProcedureAttribute.cs
- SchemaConstraints.cs
- XPathDocumentBuilder.cs
- PropertyGridCommands.cs
- TypeDependencyAttribute.cs
- InstancePersistenceContext.cs
- BaseHashHelper.cs
- GeometryValueSerializer.cs
- Stack.cs
- WebPageTraceListener.cs
- ListSortDescriptionCollection.cs
- ProgressBarBrushConverter.cs
- MetabaseServerConfig.cs
- WindowHideOrCloseTracker.cs
- DefaultAsyncDataDispatcher.cs
- TextDocumentView.cs
- QilTypeChecker.cs
- BidirectionalDictionary.cs
- MultiTrigger.cs
- SqlConnectionString.cs
- AnnotationHighlightLayer.cs
- PlainXmlSerializer.cs
- AddDataControlFieldDialog.cs
- SamlNameIdentifierClaimResource.cs
- NoneExcludedImageIndexConverter.cs
- SystemIcmpV6Statistics.cs
- AdjustableArrowCap.cs
- SettingsProperty.cs
- XPathScanner.cs
- SurrogateDataContract.cs
- EntityRecordInfo.cs
- WebBrowserNavigatingEventHandler.cs
- Guid.cs
- ToolStripSplitStackLayout.cs
- TreeView.cs
- UidManager.cs
- Dump.cs
- UrlAuthFailedErrorFormatter.cs
- NCryptNative.cs
- ScriptingAuthenticationServiceSection.cs
- AppSettingsSection.cs
- AppLevelCompilationSectionCache.cs
- Clipboard.cs
- ComplusTypeValidator.cs
- ByteConverter.cs
- DomainConstraint.cs
- NetCodeGroup.cs
- TimeSpanValidator.cs
- XmlSchemaAttribute.cs