Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / ProfilePropertyNameValidator.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeThemeHandle.cs
- XmlRawWriter.cs
- ImageMap.cs
- OdbcEnvironmentHandle.cs
- MediaContext.cs
- IndicCharClassifier.cs
- MultiTargetingUtil.cs
- ComponentEditorForm.cs
- JournalEntryStack.cs
- PolicyException.cs
- OutputCacheProfile.cs
- CustomErrorCollection.cs
- PolicyLevel.cs
- CmsInterop.cs
- ThreadSafeMessageFilterTable.cs
- BuildResultCache.cs
- CustomTrackingRecord.cs
- ForeignKeyConstraint.cs
- ServiceParser.cs
- InputProcessorProfiles.cs
- SemanticTag.cs
- LexicalChunk.cs
- NullableConverter.cs
- StaticResourceExtension.cs
- SystemIPInterfaceProperties.cs
- SignatureHelper.cs
- SqlBulkCopyColumnMappingCollection.cs
- SymbolEqualComparer.cs
- SamlAssertion.cs
- ConfigXmlSignificantWhitespace.cs
- CodeExpressionRuleDeclaration.cs
- DataColumnCollection.cs
- CompiledQuery.cs
- CompositeActivityValidator.cs
- Rfc2898DeriveBytes.cs
- MsdtcClusterUtils.cs
- Transform.cs
- TimelineCollection.cs
- WebMethodAttribute.cs
- ImportContext.cs
- HtmlUtf8RawTextWriter.cs
- TextSerializer.cs
- DownloadProgressEventArgs.cs
- GacUtil.cs
- IItemProperties.cs
- XamlVector3DCollectionSerializer.cs
- DocumentGridContextMenu.cs
- TagPrefixCollection.cs
- CodeDomConfigurationHandler.cs
- DataException.cs
- QilFunction.cs
- EnumValAlphaComparer.cs
- ListViewItemMouseHoverEvent.cs
- PageParser.cs
- ProfilePropertyMetadata.cs
- fixedPageContentExtractor.cs
- Int64AnimationUsingKeyFrames.cs
- PersonalizationStateInfoCollection.cs
- cookiecollection.cs
- OwnerDrawPropertyBag.cs
- WindowsSysHeader.cs
- LineBreakRecord.cs
- TextRange.cs
- TabItemWrapperAutomationPeer.cs
- SimpleRecyclingCache.cs
- XmlNullResolver.cs
- RelationshipDetailsRow.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ColorTransform.cs
- PersistenceTypeAttribute.cs
- WmlPhoneCallAdapter.cs
- DataGridViewHeaderCell.cs
- SkewTransform.cs
- OptionalColumn.cs
- LogicalExpressionEditor.cs
- CustomErrorCollection.cs
- ActiveXSite.cs
- ContainerAction.cs
- COM2IProvidePropertyBuilderHandler.cs
- WsiProfilesElement.cs
- PropertyValueUIItem.cs
- OrderByQueryOptionExpression.cs
- ScriptingSectionGroup.cs
- Int32Storage.cs
- AsymmetricKeyExchangeDeformatter.cs
- CompositeCollection.cs
- AttributeSetAction.cs
- LinqDataSource.cs
- RequestValidator.cs
- CodeGen.cs
- ToolStripDropDownClosingEventArgs.cs
- CodeRemoveEventStatement.cs
- WebHeaderCollection.cs
- CodeDomConfigurationHandler.cs
- FormatSettings.cs
- CustomDictionarySources.cs
- OleDbErrorCollection.cs
- PackWebResponse.cs
- ClockGroup.cs
- ExtensionWindowResizeGrip.cs