Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- HostingEnvironmentException.cs
- WebPartEventArgs.cs
- HttpConfigurationContext.cs
- DXD.cs
- SelfIssuedAuthAsymmetricKey.cs
- EntityClassGenerator.cs
- SafeTimerHandle.cs
- DelegateSerializationHolder.cs
- SymLanguageVendor.cs
- Exception.cs
- SqlServices.cs
- XmlDataSource.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- XmlTextWriter.cs
- BamlRecordWriter.cs
- DependencyObject.cs
- InternalRelationshipCollection.cs
- ImmComposition.cs
- PointCollectionConverter.cs
- FilteredAttributeCollection.cs
- WsdlBuildProvider.cs
- DataSourceView.cs
- TextParagraphView.cs
- ProtocolsSection.cs
- MonitorWrapper.cs
- typedescriptorpermissionattribute.cs
- UnicodeEncoding.cs
- MessageLoggingElement.cs
- Run.cs
- XmlMessageFormatter.cs
- basenumberconverter.cs
- ProgressBar.cs
- MachineSettingsSection.cs
- ScaleTransform3D.cs
- XmlQueryRuntime.cs
- DependencyObjectPropertyDescriptor.cs
- Activator.cs
- WorkflowFileItem.cs
- CompModSwitches.cs
- TableColumnCollectionInternal.cs
- NameValueCollection.cs
- QilGeneratorEnv.cs
- ElementUtil.cs
- BackStopAuthenticationModule.cs
- CommandLineParser.cs
- ChtmlCalendarAdapter.cs
- MetadataWorkspace.cs
- XamlClipboardData.cs
- FormatStringEditor.cs
- OverlappedAsyncResult.cs
- Int32EqualityComparer.cs
- Config.cs
- Literal.cs
- VScrollBar.cs
- ChangeProcessor.cs
- Rect3D.cs
- nulltextcontainer.cs
- Debug.cs
- Point4D.cs
- SqlProcedureAttribute.cs
- BezierSegment.cs
- BreakSafeBase.cs
- IdentifierService.cs
- RuleInfoComparer.cs
- TextLineResult.cs
- WebConfigurationFileMap.cs
- ThreadAbortException.cs
- SystemResourceHost.cs
- TerminatorSinks.cs
- PropertyOrder.cs
- RenderOptions.cs
- cryptoapiTransform.cs
- DatatypeImplementation.cs
- PenThreadWorker.cs
- TTSEvent.cs
- _NegotiateClient.cs
- MetadataSerializer.cs
- VisualTreeUtils.cs
- EpmContentSerializer.cs
- SchemaInfo.cs
- DataGridViewComboBoxColumnDesigner.cs
- SelectionEditor.cs
- MaskInputRejectedEventArgs.cs
- ConfigUtil.cs
- RTTypeWrapper.cs
- ErrorRuntimeConfig.cs
- BitHelper.cs
- WebPartAddingEventArgs.cs
- PropertyGridEditorPart.cs
- BamlReader.cs
- PtsPage.cs
- ListDictionaryInternal.cs
- DelayedRegex.cs
- SafeArrayTypeMismatchException.cs
- GenerateTemporaryTargetAssembly.cs
- EventPropertyMap.cs
- SqlGatherConsumedAliases.cs
- ConfigurationManagerHelper.cs
- FlowDocumentFormatter.cs
- FlowDocumentFormatter.cs