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
- DataGridViewColumnCollection.cs
- ProfessionalColors.cs
- ModelUtilities.cs
- CodeBlockBuilder.cs
- TextDecoration.cs
- ServiceElementCollection.cs
- FlowLayoutSettings.cs
- DataGridViewRow.cs
- _NtlmClient.cs
- UserControl.cs
- ScriptingSectionGroup.cs
- TextEffect.cs
- keycontainerpermission.cs
- ExecutedRoutedEventArgs.cs
- XsltInput.cs
- CompoundFileDeflateTransform.cs
- FixedDSBuilder.cs
- ErrorRuntimeConfig.cs
- UrlAuthFailedErrorFormatter.cs
- BrowserCapabilitiesFactory.cs
- ContentPlaceHolder.cs
- SerializationStore.cs
- EntityWrapper.cs
- BitmapImage.cs
- XMLSyntaxException.cs
- TagMapCollection.cs
- Int32AnimationUsingKeyFrames.cs
- ServicePoint.cs
- DebugHandleTracker.cs
- DataTemplate.cs
- SamlAdvice.cs
- DataGridColumnHeaderAutomationPeer.cs
- ExtractorMetadata.cs
- PDBReader.cs
- UriWriter.cs
- ToolTipService.cs
- AuthenticationModeHelper.cs
- PackageDigitalSignatureManager.cs
- StaticFileHandler.cs
- RemotingSurrogateSelector.cs
- RegexGroup.cs
- XmlWrappingWriter.cs
- SettingsSavedEventArgs.cs
- NonParentingControl.cs
- HttpPostServerProtocol.cs
- Int16Animation.cs
- BatchWriter.cs
- mediapermission.cs
- BindableTemplateBuilder.cs
- ComplexTypeEmitter.cs
- PeerInvitationResponse.cs
- RequestCachePolicy.cs
- SqlInternalConnection.cs
- ItemsChangedEventArgs.cs
- ColumnPropertiesGroup.cs
- AutoResizedEvent.cs
- CreatingCookieEventArgs.cs
- WeakReferenceEnumerator.cs
- ComponentEditorForm.cs
- DataGridViewImageCell.cs
- BamlStream.cs
- DbProviderSpecificTypePropertyAttribute.cs
- Operator.cs
- MouseGestureConverter.cs
- ListBox.cs
- DependencyObjectType.cs
- OledbConnectionStringbuilder.cs
- SiteMapNodeItem.cs
- CodeGenerator.cs
- ToolStripComboBox.cs
- CommandTreeTypeHelper.cs
- WSSecurityTokenSerializer.cs
- LoadGrammarCompletedEventArgs.cs
- WebServiceResponse.cs
- XmlnsPrefixAttribute.cs
- WmlLiteralTextAdapter.cs
- SiteMapDataSource.cs
- SendMailErrorEventArgs.cs
- TreeNodeCollectionEditorDialog.cs
- SharedStream.cs
- WindowsContainer.cs
- SerializationSectionGroup.cs
- Header.cs
- Debug.cs
- SemaphoreSecurity.cs
- DiscoveryMessageProperty.cs
- MimeMultiPart.cs
- XmlSchemaAttributeGroup.cs
- PassportIdentity.cs
- MultiViewDesigner.cs
- GridViewUpdateEventArgs.cs
- DataBoundControlHelper.cs
- GridViewDeletedEventArgs.cs
- StorageConditionPropertyMapping.cs
- NetMsmqSecurity.cs
- Range.cs
- FastEncoderWindow.cs
- DesignerMetadata.cs
- ChannelDispatcher.cs
- DataGridViewButtonColumn.cs