Code:
/ FX-1434 / FX-1434 / 1.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
- TableRowCollection.cs
- SafeRightsManagementHandle.cs
- SchemaNamespaceManager.cs
- WsatExtendedInformation.cs
- DataRelation.cs
- XmlUtil.cs
- SettingsContext.cs
- ContractInferenceHelper.cs
- XmlText.cs
- Codec.cs
- TextTreeDeleteContentUndoUnit.cs
- AudioFormatConverter.cs
- PixelFormats.cs
- BaseAsyncResult.cs
- ProcessHost.cs
- LineServices.cs
- XmlDataProvider.cs
- RangeBaseAutomationPeer.cs
- TabRenderer.cs
- PrintDocument.cs
- PenThreadWorker.cs
- TextTreeRootNode.cs
- CodeCompiler.cs
- DataPagerField.cs
- RightNameExpirationInfoPair.cs
- ThreadNeutralSemaphore.cs
- GenericRootAutomationPeer.cs
- FileChangeNotifier.cs
- tibetanshape.cs
- SerializationStore.cs
- CodeDOMProvider.cs
- DateTimeHelper.cs
- ViewgenGatekeeper.cs
- DirectionalLight.cs
- XmlChoiceIdentifierAttribute.cs
- SerializationInfoEnumerator.cs
- SslSecurityTokenParameters.cs
- SqlFileStream.cs
- DataBoundControlHelper.cs
- TextSegment.cs
- ResetableIterator.cs
- ContextDataSourceView.cs
- HtmlTableRowCollection.cs
- IdnElement.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlIncludeAttribute.cs
- URLIdentityPermission.cs
- DBConnection.cs
- FactoryId.cs
- AccessDataSourceView.cs
- DescendentsWalker.cs
- ChannelSinkStacks.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Parsers.cs
- TextFormatterImp.cs
- PropertyTabChangedEvent.cs
- TargetFrameworkAttribute.cs
- DrawingAttributesDefaultValueFactory.cs
- HostProtectionException.cs
- SQLRoleProvider.cs
- WindowsContainer.cs
- Pen.cs
- WindowsMenu.cs
- HwndMouseInputProvider.cs
- Converter.cs
- PopupRootAutomationPeer.cs
- RawAppCommandInputReport.cs
- MetadataItem.cs
- BitmapEffectInput.cs
- DocumentReferenceCollection.cs
- InputScopeManager.cs
- DataControlImageButton.cs
- ECDsa.cs
- AppDomainManager.cs
- NativeMethods.cs
- Pick.cs
- Geometry3D.cs
- Token.cs
- ViewStateModeByIdAttribute.cs
- SoapHelper.cs
- baseshape.cs
- ImageCodecInfo.cs
- TemplatedMailWebEventProvider.cs
- MultiViewDesigner.cs
- CodeRegionDirective.cs
- XmlSchemaSimpleContent.cs
- ExpressionConverter.cs
- NodeCounter.cs
- BasicHttpMessageCredentialType.cs
- InteropBitmapSource.cs
- JoinTreeNode.cs
- ScrollViewerAutomationPeer.cs
- HttpsTransportElement.cs
- FolderBrowserDialog.cs
- ObjectListItem.cs
- PathFigureCollectionConverter.cs
- odbcmetadatacollectionnames.cs
- COM2ICategorizePropertiesHandler.cs
- SchemaNames.cs
- TdsRecordBufferSetter.cs