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
- securitymgrsite.cs
- SapiRecoInterop.cs
- MSHTMLHost.cs
- FutureFactory.cs
- ArrayExtension.cs
- XmlSchemaCompilationSettings.cs
- TextTreeTextNode.cs
- ComponentResourceKeyConverter.cs
- QilReplaceVisitor.cs
- LocalTransaction.cs
- ViewCellRelation.cs
- BinaryReader.cs
- AuthenticatedStream.cs
- Properties.cs
- SchemaImporterExtensionElementCollection.cs
- CompModSwitches.cs
- ImportCatalogPart.cs
- TreeNodeBinding.cs
- WebBrowserDesigner.cs
- TableDetailsRow.cs
- XPathMultyIterator.cs
- BinaryQueryOperator.cs
- PrintPageEvent.cs
- DataControlLinkButton.cs
- DependentList.cs
- XmlDataSource.cs
- StagingAreaInputItem.cs
- TypographyProperties.cs
- PaintValueEventArgs.cs
- WindowsPen.cs
- EventMap.cs
- ThicknessAnimationBase.cs
- HttpHandlersSection.cs
- XmlNamespaceMappingCollection.cs
- RichTextBox.cs
- RemotingService.cs
- OdbcRowUpdatingEvent.cs
- ObjectConverter.cs
- SqlDependency.cs
- Sql8ConformanceChecker.cs
- Range.cs
- EventSetter.cs
- Command.cs
- SearchForVirtualItemEventArgs.cs
- DataGridViewColumnCollection.cs
- ProgressBar.cs
- EntityDescriptor.cs
- XmlSchemaComplexContent.cs
- ColumnClickEvent.cs
- StretchValidation.cs
- ImpersonationContext.cs
- ServiceModelExtensionCollectionElement.cs
- BindingList.cs
- PermissionSetTriple.cs
- KeyboardDevice.cs
- ChangeInterceptorAttribute.cs
- MediaEntryAttribute.cs
- DataTableMappingCollection.cs
- sqlcontext.cs
- BulletChrome.cs
- BlurBitmapEffect.cs
- BrowserTree.cs
- StructuredTypeEmitter.cs
- DNS.cs
- FontStyles.cs
- FramingEncoders.cs
- CommandManager.cs
- DefaultCommandConverter.cs
- Int16KeyFrameCollection.cs
- Pkcs7Signer.cs
- WebPartTransformerAttribute.cs
- Listbox.cs
- MarkupObject.cs
- AmbientLight.cs
- Util.cs
- XmlAnyElementAttribute.cs
- ComboBoxAutomationPeer.cs
- Clause.cs
- CellParagraph.cs
- SelectionChangedEventArgs.cs
- Int32Rect.cs
- ActivityMarkupSerializationProvider.cs
- WindowsIdentity.cs
- ResourceCategoryAttribute.cs
- Misc.cs
- EntityParameter.cs
- _AcceptOverlappedAsyncResult.cs
- ColumnMapVisitor.cs
- SmiGettersStream.cs
- IIS7WorkerRequest.cs
- StdValidatorsAndConverters.cs
- MenuEventArgs.cs
- Splitter.cs
- ByteAnimation.cs
- DecoderExceptionFallback.cs
- ServiceObjectContainer.cs
- EdmValidator.cs
- ReadOnlyMetadataCollection.cs
- SplitterCancelEvent.cs
- oledbmetadatacolumnnames.cs