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
- SectionXmlInfo.cs
- DataComponentMethodGenerator.cs
- TraceSection.cs
- BindingGraph.cs
- TextContainerHelper.cs
- PeerCollaborationPermission.cs
- SmtpSection.cs
- RuntimeIdentifierPropertyAttribute.cs
- HwndStylusInputProvider.cs
- SystemKeyConverter.cs
- PasswordBoxAutomationPeer.cs
- ImageAnimator.cs
- IsolatedStorageFilePermission.cs
- DataGridViewCellEventArgs.cs
- SmiTypedGetterSetter.cs
- RegularExpressionValidator.cs
- HtmlAnchor.cs
- TransformerConfigurationWizardBase.cs
- NetworkCredential.cs
- DuplicateWaitObjectException.cs
- DrawTreeNodeEventArgs.cs
- Page.cs
- FocusChangedEventArgs.cs
- CorrelationManager.cs
- TreeNode.cs
- ToolboxBitmapAttribute.cs
- StylusButtonEventArgs.cs
- JsonSerializer.cs
- DataBindEngine.cs
- ValidationResults.cs
- Cell.cs
- Codec.cs
- XPathNodeIterator.cs
- SpeakProgressEventArgs.cs
- XmlSerializerNamespaces.cs
- WindowsBrush.cs
- RegexCapture.cs
- GenericNameHandler.cs
- WindowsStatusBar.cs
- OpenTypeLayout.cs
- HelpKeywordAttribute.cs
- PersonalizationStateQuery.cs
- SQLDoubleStorage.cs
- ByteStreamGeometryContext.cs
- Exceptions.cs
- EntitySqlException.cs
- LightweightCodeGenerator.cs
- ResolveRequestResponseAsyncResult.cs
- LongPath.cs
- ListControlConvertEventArgs.cs
- OneWayElement.cs
- securitycriticaldata.cs
- DecimalKeyFrameCollection.cs
- HitTestResult.cs
- OperationInfoBase.cs
- DataGridItem.cs
- ObsoleteAttribute.cs
- FixedSOMImage.cs
- BitmapEffectDrawingContent.cs
- MethodExpression.cs
- ScrollProviderWrapper.cs
- PathGeometry.cs
- DataGridViewRowHeaderCell.cs
- TraceHandler.cs
- DragDrop.cs
- ColumnTypeConverter.cs
- UpdateCompiler.cs
- XmlNodeReader.cs
- ADMembershipUser.cs
- UserControlAutomationPeer.cs
- XD.cs
- ItemCollection.cs
- DateTimeConverter2.cs
- NativeMethods.cs
- DefaultBindingPropertyAttribute.cs
- StrokeFIndices.cs
- WeakReadOnlyCollection.cs
- TextDecorationCollectionConverter.cs
- XmlStreamStore.cs
- ServiceDescriptionSerializer.cs
- DataGridViewColumnCollection.cs
- ConfigDefinitionUpdates.cs
- TrustLevelCollection.cs
- XmlConvert.cs
- ValidationRule.cs
- AppSettingsSection.cs
- BindUriHelper.cs
- XmlKeywords.cs
- LinkedResourceCollection.cs
- SchemaImporterExtensionElement.cs
- MouseGestureValueSerializer.cs
- DataSourceProvider.cs
- CreateParams.cs
- QilSortKey.cs
- ControlBuilderAttribute.cs
- Win32Native.cs
- DbConnectionPoolCounters.cs
- ListBase.cs
- DataControlPagerLinkButton.cs
- TypeUtils.cs