Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageCodecInfo.cs
- SeverityFilter.cs
- ParallelDesigner.xaml.cs
- FunctionNode.cs
- Quaternion.cs
- WebPartActionVerb.cs
- MissingMethodException.cs
- ScrollProperties.cs
- TypeDefinition.cs
- DataGridViewRowEventArgs.cs
- PropertyManager.cs
- CacheOutputQuery.cs
- ApplicationSettingsBase.cs
- RepeaterItemEventArgs.cs
- RadioButtonList.cs
- FullTextLine.cs
- Rijndael.cs
- BaseResourcesBuildProvider.cs
- MenuItemAutomationPeer.cs
- EntityParameterCollection.cs
- PropertyChangedEventArgs.cs
- ResXResourceReader.cs
- LassoSelectionBehavior.cs
- LinqExpressionNormalizer.cs
- LinearGradientBrush.cs
- PassportIdentity.cs
- TextSchema.cs
- FunctionDescription.cs
- WebPartCatalogCloseVerb.cs
- querybuilder.cs
- SoapFormatter.cs
- ChangePasswordAutoFormat.cs
- FamilyTypeface.cs
- OLEDB_Enum.cs
- ServiceProviders.cs
- ControlType.cs
- Debug.cs
- DataProtection.cs
- X509Utils.cs
- _HeaderInfo.cs
- TextServicesLoader.cs
- UdpSocket.cs
- ToolBarButton.cs
- MobileTemplatedControlDesigner.cs
- SponsorHelper.cs
- FileChangesMonitor.cs
- ResourceDisplayNameAttribute.cs
- WorkflowMessageEventArgs.cs
- XmlBaseReader.cs
- Span.cs
- OdbcReferenceCollection.cs
- HttpModule.cs
- ListViewCommandEventArgs.cs
- Validator.cs
- APCustomTypeDescriptor.cs
- OuterGlowBitmapEffect.cs
- XmlQualifiedName.cs
- SessionPageStatePersister.cs
- DataControlCommands.cs
- SerializationInfoEnumerator.cs
- PictureBoxDesigner.cs
- xmlsaver.cs
- BamlLocalizabilityResolver.cs
- Size3DValueSerializer.cs
- ReferenceSchema.cs
- CannotUnloadAppDomainException.cs
- BaseTreeIterator.cs
- BuildProvidersCompiler.cs
- SamlDoNotCacheCondition.cs
- QuadraticBezierSegment.cs
- ScriptReferenceBase.cs
- PageContent.cs
- CharKeyFrameCollection.cs
- TypeUtil.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- SafeRegistryHandle.cs
- NetSectionGroup.cs
- AsyncSerializedWorker.cs
- StringBuilder.cs
- Graphics.cs
- EncoderReplacementFallback.cs
- QueryCacheEntry.cs
- VirtualPath.cs
- XmlUTF8TextReader.cs
- OleDbException.cs
- ByteAnimationBase.cs
- EntityContainerRelationshipSet.cs
- WaitHandleCannotBeOpenedException.cs
- ServerValidateEventArgs.cs
- FamilyMap.cs
- DesignerAttribute.cs
- DataGridViewBindingCompleteEventArgs.cs
- EditorBrowsableAttribute.cs
- Activation.cs
- RectangleGeometry.cs
- NeutralResourcesLanguageAttribute.cs
- Content.cs
- SQLDoubleStorage.cs
- ComPlusInstanceContextInitializer.cs
- DataGridViewCell.cs