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
- StringConcat.cs
- SafeThreadHandle.cs
- ExternalException.cs
- ObjectStorage.cs
- AddInIpcChannel.cs
- IndexedString.cs
- EnumConverter.cs
- DataGridHeaderBorder.cs
- AstTree.cs
- ExceptionUtil.cs
- BitmapScalingModeValidation.cs
- FontStyle.cs
- SettingsPropertyWrongTypeException.cs
- SecurityTokenSpecification.cs
- DocumentViewerBase.cs
- Pair.cs
- TargetFrameworkUtil.cs
- XamlDesignerSerializationManager.cs
- ScrollContentPresenter.cs
- CompletedAsyncResult.cs
- RightsManagementSuppressedStream.cs
- BindUriHelper.cs
- SR.cs
- HebrewNumber.cs
- XmlFormatExtensionPrefixAttribute.cs
- MsmqTransportReceiveParameters.cs
- MulticastOption.cs
- TextClipboardData.cs
- URL.cs
- XmlUrlEditor.cs
- ModelEditingScope.cs
- BasicKeyConstraint.cs
- DoubleAnimation.cs
- PeerNearMe.cs
- DbInsertCommandTree.cs
- NamespaceList.cs
- BaseTreeIterator.cs
- BamlReader.cs
- ResourceContainer.cs
- XamlToRtfWriter.cs
- xsdvalidator.cs
- FramingEncoders.cs
- RawStylusInputReport.cs
- TimelineClockCollection.cs
- HScrollBar.cs
- SystemKeyConverter.cs
- ResourceDisplayNameAttribute.cs
- ChtmlTextWriter.cs
- DataPagerFieldCommandEventArgs.cs
- TableCell.cs
- TextEffect.cs
- UpdateTracker.cs
- DynamicVirtualDiscoSearcher.cs
- SplayTreeNode.cs
- PersonalizationState.cs
- EncoderParameter.cs
- DataReaderContainer.cs
- HitTestWithGeometryDrawingContextWalker.cs
- PointAnimationBase.cs
- BitConverter.cs
- MsmqException.cs
- RemotingConfiguration.cs
- PositiveTimeSpanValidatorAttribute.cs
- PackWebRequest.cs
- LocatorBase.cs
- WebServiceFault.cs
- SiteMapDataSourceView.cs
- nulltextcontainer.cs
- PrintPageEvent.cs
- CssStyleCollection.cs
- FixedSOMTableRow.cs
- OdbcPermission.cs
- ZoneIdentityPermission.cs
- BitmapSource.cs
- SqlFlattener.cs
- DataTemplate.cs
- IIS7UserPrincipal.cs
- StandardOleMarshalObject.cs
- AesCryptoServiceProvider.cs
- RequestResizeEvent.cs
- AxisAngleRotation3D.cs
- QilReference.cs
- ModelUIElement3D.cs
- HMACSHA1.cs
- errorpatternmatcher.cs
- HttpBufferlessInputStream.cs
- BufferedStream.cs
- COM2FontConverter.cs
- GroupBox.cs
- SystemFonts.cs
- StandardBindingCollectionElement.cs
- SQLBinary.cs
- Deflater.cs
- AssemblyLoader.cs
- ManipulationDeltaEventArgs.cs
- TableItemStyle.cs
- SynthesizerStateChangedEventArgs.cs
- TableLayoutSettingsTypeConverter.cs
- WebResponse.cs
- SectionInformation.cs