Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PositiveTimeSpanValidatorAttribute.cs
- DateTimePicker.cs
- RemoteHelper.cs
- TemplateControlParser.cs
- ServiceDesigner.cs
- QueueProcessor.cs
- CopyAttributesAction.cs
- DataGridViewCellLinkedList.cs
- TextBoxAutomationPeer.cs
- ChangeProcessor.cs
- SerialErrors.cs
- HttpTransportManager.cs
- DesignerAdapterAttribute.cs
- FormCollection.cs
- CheckBoxField.cs
- Quaternion.cs
- DeadCharTextComposition.cs
- InternalEnumValidator.cs
- UriTemplateCompoundPathSegment.cs
- Annotation.cs
- CheckBoxPopupAdapter.cs
- UndoEngine.cs
- HebrewCalendar.cs
- InvocationExpression.cs
- RepeatBehavior.cs
- XmlDictionaryString.cs
- RequestCachePolicy.cs
- XdrBuilder.cs
- TextEditorContextMenu.cs
- SetStoryboardSpeedRatio.cs
- EntityDataSourceDataSelectionPanel.cs
- DeclarationUpdate.cs
- TraceContextEventArgs.cs
- DecoderBestFitFallback.cs
- UIntPtr.cs
- DataBoundLiteralControl.cs
- MsmqMessageSerializationFormat.cs
- PlainXmlSerializer.cs
- RelationshipType.cs
- CompensateDesigner.cs
- Event.cs
- DateTimePickerDesigner.cs
- ExpressionBuilderContext.cs
- graph.cs
- Transform.cs
- Pair.cs
- RunClient.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ScriptIgnoreAttribute.cs
- EasingKeyFrames.cs
- StringPropertyBuilder.cs
- Keyboard.cs
- SingleAnimation.cs
- Drawing.cs
- ListenerSessionConnection.cs
- BamlLocalizableResourceKey.cs
- EventTrigger.cs
- AmbientProperties.cs
- InheritanceContextHelper.cs
- DataGridHelper.cs
- DataBoundControlHelper.cs
- DocumentAutomationPeer.cs
- JoinCqlBlock.cs
- IDReferencePropertyAttribute.cs
- CodeDomSerializer.cs
- SqlRemoveConstantOrderBy.cs
- OleDbSchemaGuid.cs
- TraceXPathNavigator.cs
- RoutedCommand.cs
- SQLSingle.cs
- DictionaryContent.cs
- TrimSurroundingWhitespaceAttribute.cs
- ClientCultureInfo.cs
- SectionXmlInfo.cs
- XmlSerializableServices.cs
- RelativeSource.cs
- CollectionViewGroup.cs
- ButtonFlatAdapter.cs
- messageonlyhwndwrapper.cs
- MessageQueueCriteria.cs
- WebPartMovingEventArgs.cs
- NativeMethods.cs
- EventLogPermission.cs
- UseAttributeSetsAction.cs
- DateTimeStorage.cs
- CodeSnippetStatement.cs
- ActivityStatusChangeEventArgs.cs
- ToolZone.cs
- TransactionManagerProxy.cs
- SerializationStore.cs
- DataGridRowAutomationPeer.cs
- PropertyBuilder.cs
- Attributes.cs
- GlobalizationAssembly.cs
- WebWorkflowRole.cs
- SQLDoubleStorage.cs
- DesignBinding.cs
- AdCreatedEventArgs.cs
- GenericFlowSwitchHelper.cs
- JulianCalendar.cs