Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / 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. //------------------------------------------------------------------------------ //// 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
- X509Certificate2.cs
- BlurEffect.cs
- XmlSchemaProviderAttribute.cs
- ToolStripOverflowButton.cs
- SignatureDescription.cs
- TextSpanModifier.cs
- Speller.cs
- XmlElementAttributes.cs
- DataProviderNameConverter.cs
- ImageField.cs
- FormsIdentity.cs
- XPathExpr.cs
- DataGridViewRowCollection.cs
- ManagementInstaller.cs
- UnicodeEncoding.cs
- ExpressionNormalizer.cs
- SemaphoreSecurity.cs
- MatchingStyle.cs
- ArraySubsetEnumerator.cs
- DelegateOutArgument.cs
- HostSecurityManager.cs
- ManagedWndProcTracker.cs
- milexports.cs
- XmlSerializableWriter.cs
- PeekCompletedEventArgs.cs
- Cursor.cs
- ObjectItemAttributeAssemblyLoader.cs
- HelpKeywordAttribute.cs
- TextInfo.cs
- ClientBuildManagerCallback.cs
- FrameDimension.cs
- AnnouncementClient.cs
- GridViewPageEventArgs.cs
- IPHostEntry.cs
- WorkflowInvoker.cs
- MasterPageParser.cs
- AsymmetricAlgorithm.cs
- FragmentNavigationEventArgs.cs
- ExpressionCopier.cs
- TextTreeUndo.cs
- ParagraphVisual.cs
- HttpResponseHeader.cs
- GridViewItemAutomationPeer.cs
- DataGridViewCellValueEventArgs.cs
- AnnotationComponentChooser.cs
- FixedFlowMap.cs
- EmptyControlCollection.cs
- XNodeNavigator.cs
- COM2EnumConverter.cs
- URLIdentityPermission.cs
- SubpageParagraph.cs
- RepeaterItem.cs
- TextServicesPropertyRanges.cs
- CodeEntryPointMethod.cs
- FormsIdentity.cs
- TagMapInfo.cs
- FtpRequestCacheValidator.cs
- EUCJPEncoding.cs
- Control.cs
- DispatcherExceptionEventArgs.cs
- CqlLexerHelpers.cs
- PeerCollaboration.cs
- XmlDataContract.cs
- RowBinding.cs
- Message.cs
- SqlGenericUtil.cs
- ServicePointManager.cs
- DataGridHeaderBorder.cs
- FixUpCollection.cs
- XmlNamespaceDeclarationsAttribute.cs
- StringFormat.cs
- MultiView.cs
- MD5.cs
- WebPartActionVerb.cs
- ControlEvent.cs
- IdnElement.cs
- XmlUtil.cs
- loginstatus.cs
- NotifyIcon.cs
- ListItemCollection.cs
- sqlmetadatafactory.cs
- MailDefinition.cs
- ObjectPropertyMapping.cs
- FormViewRow.cs
- ChangeInterceptorAttribute.cs
- StandardCommands.cs
- MexHttpBindingCollectionElement.cs
- Encoding.cs
- ListViewGroupItemCollection.cs
- PenThreadWorker.cs
- Event.cs
- PrePostDescendentsWalker.cs
- figurelength.cs
- XmlHierarchyData.cs
- DesigntimeLicenseContext.cs
- DocumentPageTextView.cs
- ControlCommandSet.cs
- OracleParameterCollection.cs
- ELinqQueryState.cs
- DataControlExtensions.cs