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
- ConditionCollection.cs
- Hashtable.cs
- FixUp.cs
- ConnectionInterfaceCollection.cs
- NegationPusher.cs
- DetailsViewCommandEventArgs.cs
- XPathCompileException.cs
- StructureChangedEventArgs.cs
- ResourceExpressionBuilder.cs
- ReverseQueryOperator.cs
- ExpressionCopier.cs
- ServiceOperationListItemList.cs
- FrameworkContextData.cs
- StringToken.cs
- CoTaskMemHandle.cs
- DbConnectionPoolOptions.cs
- UpdatePanel.cs
- XPathSelfQuery.cs
- WebServiceHost.cs
- APCustomTypeDescriptor.cs
- PropertyInfoSet.cs
- CommonServiceBehaviorElement.cs
- ThicknessAnimation.cs
- FileUtil.cs
- DrawingGroupDrawingContext.cs
- PropertyBuilder.cs
- ImageSourceValueSerializer.cs
- UserUseLicenseDictionaryLoader.cs
- OracleParameterCollection.cs
- HttpTransportManager.cs
- TextFormatterImp.cs
- LambdaCompiler.Binary.cs
- SynchronousReceiveBehavior.cs
- XmlElementAttribute.cs
- FrameworkElement.cs
- DictionaryTraceRecord.cs
- DecimalAnimationBase.cs
- ScrollChrome.cs
- TextSelectionProcessor.cs
- RevocationPoint.cs
- AuthorizationRuleCollection.cs
- HostVisual.cs
- _KerberosClient.cs
- ReliableRequestSessionChannel.cs
- EffectiveValueEntry.cs
- StateDesigner.Helpers.cs
- GridViewRowCollection.cs
- BitmapEffectGroup.cs
- ContentDisposition.cs
- AxisAngleRotation3D.cs
- WebPartUserCapability.cs
- LayoutExceptionEventArgs.cs
- UshortList2.cs
- DefaultDialogButtons.cs
- PathFigure.cs
- InputDevice.cs
- InternalsVisibleToAttribute.cs
- DecimalAnimation.cs
- BackgroundFormatInfo.cs
- CompleteWizardStep.cs
- XmlSchemaChoice.cs
- RtfToXamlLexer.cs
- PathTooLongException.cs
- ContentValidator.cs
- EventLogPermissionEntryCollection.cs
- glyphs.cs
- XmlNodeChangedEventManager.cs
- XmlDocumentSchema.cs
- OracleInfoMessageEventArgs.cs
- TcpHostedTransportConfiguration.cs
- SynchronizationContext.cs
- SqlParameterCollection.cs
- FlowNode.cs
- ReadOnlyPropertyMetadata.cs
- DataTableExtensions.cs
- FileUpload.cs
- ApplicationActivator.cs
- Model3D.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- RichTextBoxConstants.cs
- AddInSegmentDirectoryNotFoundException.cs
- FormViewDeletedEventArgs.cs
- ErrorWebPart.cs
- LineGeometry.cs
- Debugger.cs
- BitmapPalette.cs
- ScaleTransform3D.cs
- XmlSchemaImporter.cs
- Point3DAnimation.cs
- PrimaryKeyTypeConverter.cs
- FunctionDefinition.cs
- SR.cs
- DateTimeConverter.cs
- FilterQueryOptionExpression.cs
- BaseParagraph.cs
- File.cs
- ApplicationTrust.cs
- AttributeCollection.cs
- EtwProvider.cs
- SqlSelectStatement.cs