Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlNodeChangedEventManager.cs
- XmlSchemaComplexType.cs
- ResolveNameEventArgs.cs
- TextPointer.cs
- mediaeventshelper.cs
- SecurityElement.cs
- EditorBrowsableAttribute.cs
- TrackingServices.cs
- DataPagerFieldCollection.cs
- xsdvalidator.cs
- basenumberconverter.cs
- ImportCatalogPart.cs
- SafeHandles.cs
- FactoryId.cs
- BaseUriHelper.cs
- ViewService.cs
- ContentIterators.cs
- DrawingAttributeSerializer.cs
- ProfileSettingsCollection.cs
- XmlAnyElementAttributes.cs
- NegatedCellConstant.cs
- CqlIdentifiers.cs
- ItemChangedEventArgs.cs
- WindowsSpinner.cs
- DataObject.cs
- PropertyNames.cs
- IntegerFacetDescriptionElement.cs
- Stroke2.cs
- ColumnProvider.cs
- NetCodeGroup.cs
- TemplateBindingExtensionConverter.cs
- TreeWalker.cs
- Query.cs
- CultureInfo.cs
- PeerName.cs
- TheQuery.cs
- LogWriteRestartAreaState.cs
- DbConnectionPoolGroup.cs
- DirectoryObjectSecurity.cs
- SettingsSection.cs
- TypedTableBase.cs
- Rect3D.cs
- Pair.cs
- FixedDocumentSequencePaginator.cs
- LifetimeServices.cs
- Int16Storage.cs
- NameValueSectionHandler.cs
- ApplicationManager.cs
- XPathNode.cs
- PropertySet.cs
- GeneralTransformCollection.cs
- Subtree.cs
- ContractNamespaceAttribute.cs
- DebugHandleTracker.cs
- ServiceBehaviorElement.cs
- NotSupportedException.cs
- DataGridRowDetailsEventArgs.cs
- DBConnection.cs
- TypeUtil.cs
- ActivityAction.cs
- HebrewNumber.cs
- PrimaryKeyTypeConverter.cs
- ToolBarOverflowPanel.cs
- RelatedPropertyManager.cs
- ping.cs
- TemplatedWizardStep.cs
- ListViewTableRow.cs
- SiteOfOriginContainer.cs
- GridErrorDlg.cs
- EasingKeyFrames.cs
- EmbossBitmapEffect.cs
- PointHitTestParameters.cs
- CodeDomComponentSerializationService.cs
- SoapTypeAttribute.cs
- UndirectedGraph.cs
- ValidatingPropertiesEventArgs.cs
- HMAC.cs
- OdbcStatementHandle.cs
- BrowserCapabilitiesCodeGenerator.cs
- NumberFormatInfo.cs
- TileBrush.cs
- ComPlusDiagnosticTraceSchemas.cs
- SoapAttributeAttribute.cs
- StickyNote.cs
- OdbcConnectionPoolProviderInfo.cs
- Misc.cs
- FixedLineResult.cs
- NativeRecognizer.cs
- ClipboardProcessor.cs
- CodeObject.cs
- TimersDescriptionAttribute.cs
- SimpleType.cs
- GatewayDefinition.cs
- Transform3DGroup.cs
- wpf-etw.cs
- LateBoundChannelParameterCollection.cs
- StringResourceManager.cs
- ActiveXSerializer.cs
- XmlSchemaSearchPattern.cs
- GroupBox.cs