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
- NameService.cs
- MiniCustomAttributeInfo.cs
- WebPartTracker.cs
- ScrollEventArgs.cs
- WhereQueryOperator.cs
- RewritingProcessor.cs
- Asn1Utilities.cs
- ErrorWrapper.cs
- AttributedMetaModel.cs
- ToggleButton.cs
- CardSpaceShim.cs
- CorrelationRequestContext.cs
- BasicHttpSecurity.cs
- EntityClientCacheKey.cs
- SmiMetaData.cs
- SoapProtocolReflector.cs
- XhtmlTextWriter.cs
- QueryResults.cs
- figurelengthconverter.cs
- ArcSegment.cs
- BamlRecords.cs
- StorageEntitySetMapping.cs
- KeyValuePairs.cs
- TypeElementCollection.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- GridViewPageEventArgs.cs
- MetadataItemSerializer.cs
- InvalidCastException.cs
- CollectionEditVerbManager.cs
- Quaternion.cs
- indexingfiltermarshaler.cs
- CodeVariableDeclarationStatement.cs
- UpDownEvent.cs
- TableRowGroup.cs
- Button.cs
- ProfileService.cs
- StylusCollection.cs
- AutomationAttributeInfo.cs
- DocComment.cs
- ToolboxItemAttribute.cs
- TimeSpan.cs
- SortExpressionBuilder.cs
- RowParagraph.cs
- RegexCapture.cs
- LocalizationParserHooks.cs
- MediaContextNotificationWindow.cs
- DataGridViewCheckBoxColumn.cs
- UnconditionalPolicy.cs
- XmlExpressionDumper.cs
- ServiceDescriptions.cs
- ContentElement.cs
- ForeignConstraint.cs
- ObjectItemCachedAssemblyLoader.cs
- DisplayInformation.cs
- ReferenceSchema.cs
- BitmapEffectInput.cs
- HierarchicalDataTemplate.cs
- ProtocolElement.cs
- LinqDataSourceContextData.cs
- PeerName.cs
- GridViewRowCollection.cs
- FileAuthorizationModule.cs
- SymbolEqualComparer.cs
- TextTreeTextElementNode.cs
- UnsupportedPolicyOptionsException.cs
- StorageRoot.cs
- SQLDoubleStorage.cs
- SqlStream.cs
- X509LogoTypeExtension.cs
- DataGridViewTextBoxEditingControl.cs
- CodeStatementCollection.cs
- GridLength.cs
- Typeface.cs
- Application.cs
- FunctionImportMapping.cs
- InfoCardSymmetricCrypto.cs
- ErrorHandlerFaultInfo.cs
- Attributes.cs
- ScriptControl.cs
- TableParaClient.cs
- hebrewshape.cs
- EdmSchemaError.cs
- SafePointer.cs
- PeerApplication.cs
- TextEditorMouse.cs
- ModelServiceImpl.cs
- MatrixTransform3D.cs
- CachedCompositeFamily.cs
- StateDesignerConnector.cs
- IPAddress.cs
- PointF.cs
- SecondaryViewProvider.cs
- PointLightBase.cs
- OleDbException.cs
- DurableRuntimeValidator.cs
- TypedTableGenerator.cs
- HighContrastHelper.cs
- Dictionary.cs
- RequestCacheEntry.cs
- EntityException.cs