Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- BaseTemplateBuildProvider.cs
- TypeConstant.cs
- StreamWithDictionary.cs
- DependencyPropertyKind.cs
- AffineTransform3D.cs
- DefaultHttpHandler.cs
- FormViewModeEventArgs.cs
- DelegateInArgument.cs
- TextTreeText.cs
- IisTraceWebEventProvider.cs
- Storyboard.cs
- TimersDescriptionAttribute.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- PageContent.cs
- SubclassTypeValidatorAttribute.cs
- AnimationException.cs
- DataGridRowDetailsEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- TriState.cs
- RoleService.cs
- TextWriter.cs
- NameValuePair.cs
- CacheModeConverter.cs
- UIElement3D.cs
- ExtractorMetadata.cs
- ApplicationProxyInternal.cs
- PriorityQueue.cs
- FixedBufferAttribute.cs
- coordinatorscratchpad.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- SelectionListComponentEditor.cs
- RayHitTestParameters.cs
- PluralizationServiceUtil.cs
- ImportCatalogPart.cs
- CheckBox.cs
- ListenDesigner.cs
- InheritablePropertyChangeInfo.cs
- Visual3D.cs
- JavaScriptSerializer.cs
- Separator.cs
- DocumentSchemaValidator.cs
- BaseDataBoundControl.cs
- LazyTextWriterCreator.cs
- InlineCategoriesDocument.cs
- XmlSchemaParticle.cs
- Cursor.cs
- StreamGeometry.cs
- PersonalizationAdministration.cs
- WebPartChrome.cs
- QuadraticBezierSegment.cs
- Rect.cs
- Rule.cs
- DataPointer.cs
- ErrorLog.cs
- DataSourceCache.cs
- FileDataSourceCache.cs
- ExpressionBuilderContext.cs
- BitmapEffectCollection.cs
- SchemaTableOptionalColumn.cs
- View.cs
- SchemaLookupTable.cs
- ClientSideProviderDescription.cs
- DisplayNameAttribute.cs
- SQLBytesStorage.cs
- MemberPath.cs
- StaticResourceExtension.cs
- StdValidatorsAndConverters.cs
- FacetDescription.cs
- SafeTimerHandle.cs
- Point4DValueSerializer.cs
- ContentControl.cs
- DataSysAttribute.cs
- SoapAttributes.cs
- StrongTypingException.cs
- SingleTagSectionHandler.cs
- SamlAttributeStatement.cs
- ValueType.cs
- ColorConverter.cs
- EmissiveMaterial.cs
- WindowsListViewGroup.cs
- DataTemplateSelector.cs
- NonClientArea.cs
- DtdParser.cs
- ExpressionBindings.cs
- WebPartEditorApplyVerb.cs
- Journaling.cs
- SchemaManager.cs
- ClaimComparer.cs
- Trace.cs
- QueryCacheManager.cs
- FixedSOMPageElement.cs
- WebPartAuthorizationEventArgs.cs
- ConstrainedDataObject.cs
- ValidatorCollection.cs
- ContextQuery.cs
- MediaScriptCommandRoutedEventArgs.cs
- StringUtil.cs
- DirectionalLight.cs
- ThicknessAnimation.cs
- RootAction.cs