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
- webbrowsersite.cs
- SchemaLookupTable.cs
- QuaternionValueSerializer.cs
- WorkflowInvoker.cs
- ResourcesChangeInfo.cs
- MediaContextNotificationWindow.cs
- ViewStateModeByIdAttribute.cs
- ForeignConstraint.cs
- Quaternion.cs
- SymbolMethod.cs
- HtmlElementEventArgs.cs
- ClientTargetCollection.cs
- PropertyInformationCollection.cs
- AspProxy.cs
- DataRow.cs
- RegexFCD.cs
- PersonalizationStateInfo.cs
- AddInProcess.cs
- StyleSelector.cs
- CloseCryptoHandleRequest.cs
- GatewayIPAddressInformationCollection.cs
- MSHTMLHost.cs
- ConnectionsZoneDesigner.cs
- AnnotationResourceCollection.cs
- ScrollPattern.cs
- Propagator.ExtentPlaceholderCreator.cs
- EmbeddedMailObjectsCollection.cs
- PermissionAttributes.cs
- ScrollableControl.cs
- QueryPageSettingsEventArgs.cs
- ListControlDesigner.cs
- Renderer.cs
- ActiveXContainer.cs
- HttpChannelHelper.cs
- GlobalProxySelection.cs
- HttpRuntime.cs
- ObjectDisposedException.cs
- GeometryHitTestParameters.cs
- SimpleTextLine.cs
- ItemChangedEventArgs.cs
- Scanner.cs
- PolyLineSegmentFigureLogic.cs
- ExecutionEngineException.cs
- KnownTypesHelper.cs
- _FixedSizeReader.cs
- CustomCredentialPolicy.cs
- MsdtcClusterUtils.cs
- DesignerOptionService.cs
- MatrixIndependentAnimationStorage.cs
- WebFaultClientMessageInspector.cs
- DataObjectAttribute.cs
- EntitySetRetriever.cs
- QualifiedId.cs
- CodeCompileUnit.cs
- DataGridCell.cs
- PrintDocument.cs
- Frame.cs
- AsyncResult.cs
- WebPartVerbsEventArgs.cs
- GridViewEditEventArgs.cs
- PropertyStore.cs
- CodeDomConfigurationHandler.cs
- DataTemplateKey.cs
- SqlUtil.cs
- unitconverter.cs
- CodeNamespaceImport.cs
- AmbientLight.cs
- RuntimeConfigLKG.cs
- UserControlAutomationPeer.cs
- SmtpFailedRecipientsException.cs
- UserNamePasswordValidationMode.cs
- PtsContext.cs
- CancellationState.cs
- Interlocked.cs
- OdbcException.cs
- Application.cs
- SecurityToken.cs
- Attachment.cs
- ConfigXmlDocument.cs
- _FixedSizeReader.cs
- QuestionEventArgs.cs
- TransformationRules.cs
- AuthorizationSection.cs
- DateTimeValueSerializer.cs
- WeakReference.cs
- ValidatorCollection.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- OracleParameterCollection.cs
- DomainUpDown.cs
- SpoolingTaskBase.cs
- SaveFileDialog.cs
- WebPartHeaderCloseVerb.cs
- PlaceHolder.cs
- FormatStringEditor.cs
- CssTextWriter.cs
- CatalogPart.cs
- MimeBasePart.cs
- HMAC.cs
- FatalException.cs
- Classification.cs