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
- HelpProvider.cs
- DatePickerTextBox.cs
- FilteredDataSetHelper.cs
- SystemNetworkInterface.cs
- IncrementalHitTester.cs
- SqlDataSource.cs
- BinaryFormatter.cs
- Error.cs
- CustomAttributeFormatException.cs
- ColorMap.cs
- SqlRecordBuffer.cs
- ControlPropertyNameConverter.cs
- EdmFunctionAttribute.cs
- SmtpMail.cs
- Assert.cs
- MobileControlDesigner.cs
- SessionEndedEventArgs.cs
- CollectionDataContract.cs
- Executor.cs
- ClientSettings.cs
- RegexTree.cs
- WebPartAddingEventArgs.cs
- ConnectionsZoneDesigner.cs
- HtmlToClrEventProxy.cs
- MatrixValueSerializer.cs
- HtmlShimManager.cs
- SqlDataReaderSmi.cs
- AssemblySettingAttributes.cs
- TypeCodeDomSerializer.cs
- DriveNotFoundException.cs
- DataGridViewRowConverter.cs
- BulletChrome.cs
- FullTextState.cs
- CSharpCodeProvider.cs
- DateTimeFormatInfo.cs
- MatrixTransform3D.cs
- IntranetCredentialPolicy.cs
- MgmtConfigurationRecord.cs
- _LocalDataStore.cs
- HtmlEmptyTagControlBuilder.cs
- WindowsButton.cs
- FormViewModeEventArgs.cs
- FrameworkTextComposition.cs
- Nodes.cs
- ReferentialConstraint.cs
- ControlBindingsConverter.cs
- Pair.cs
- ToolBarButtonDesigner.cs
- VoiceSynthesis.cs
- TreeNodeMouseHoverEvent.cs
- VBIdentifierDesigner.xaml.cs
- RootDesignerSerializerAttribute.cs
- HtmlEmptyTagControlBuilder.cs
- StatusStrip.cs
- shaperfactory.cs
- BaseHashHelper.cs
- RSAProtectedConfigurationProvider.cs
- DataGridViewHeaderCell.cs
- ScrollItemProviderWrapper.cs
- TextServicesLoader.cs
- FontInfo.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DataGridViewLinkCell.cs
- PhonemeEventArgs.cs
- FixedFindEngine.cs
- CompositeTypefaceMetrics.cs
- FixedTextBuilder.cs
- QueuedDeliveryRequirementsMode.cs
- DataTableCollection.cs
- SelectionItemProviderWrapper.cs
- CodeMethodInvokeExpression.cs
- CreateUserWizardStep.cs
- MetadataItemSerializer.cs
- LayoutInformation.cs
- CodePageUtils.cs
- SQLInt32Storage.cs
- WindowsGraphicsCacheManager.cs
- WithParamAction.cs
- MemberProjectionIndex.cs
- MSHTMLHost.cs
- MembershipPasswordException.cs
- SettingsContext.cs
- DrawingAttributesDefaultValueFactory.cs
- WindowClosedEventArgs.cs
- CompositeTypefaceMetrics.cs
- MergeLocalizationDirectives.cs
- DataGridViewIntLinkedList.cs
- MatrixConverter.cs
- ObjectDataSourceView.cs
- BitmapEffectGeneralTransform.cs
- SqlFacetAttribute.cs
- PlainXmlDeserializer.cs
- XmlCharType.cs
- SecurityHeaderLayout.cs
- ValueSerializer.cs
- RuntimeVariablesExpression.cs
- SchemaImporterExtensionElementCollection.cs
- ColumnResizeUndoUnit.cs
- SchemaAttDef.cs
- PrimitiveXmlSerializers.cs