Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- EndpointInstanceProvider.cs
- SQLMembershipProvider.cs
- CharacterBufferReference.cs
- WebSysDefaultValueAttribute.cs
- Base64Stream.cs
- CoreSwitches.cs
- DataGridViewRowCancelEventArgs.cs
- TypePropertyEditor.cs
- FrameworkTemplate.cs
- MimeTypeMapper.cs
- PreloadedPackages.cs
- ListViewItemMouseHoverEvent.cs
- ApplicationCommands.cs
- RelatedImageListAttribute.cs
- GroupQuery.cs
- MarkupWriter.cs
- MetadataWorkspace.cs
- ProtocolsConfiguration.cs
- TypeInfo.cs
- BackStopAuthenticationModule.cs
- SHA384.cs
- FixedTextView.cs
- VectorCollectionValueSerializer.cs
- ReversePositionQuery.cs
- ColumnMapVisitor.cs
- UnsafeNativeMethods.cs
- SizeChangedInfo.cs
- GenericIdentity.cs
- TextRangeEditTables.cs
- InvalidCommandTreeException.cs
- HtmlFormWrapper.cs
- StorageEntityTypeMapping.cs
- TextWriter.cs
- HttpModuleActionCollection.cs
- Rotation3D.cs
- BuildProviderInstallComponent.cs
- WebPartEditorApplyVerb.cs
- RemotingServices.cs
- LineSegment.cs
- ChannelEndpointElement.cs
- IxmlLineInfo.cs
- XsltContext.cs
- HostVisual.cs
- WebPartConnectVerb.cs
- CorrelationManager.cs
- ProxyHwnd.cs
- ColumnBinding.cs
- WmlLiteralTextAdapter.cs
- StateWorkerRequest.cs
- WinEventTracker.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- MenuEventArgs.cs
- ObjectKeyFrameCollection.cs
- ReliableReplySessionChannel.cs
- CodeCommentStatement.cs
- SchemaTypeEmitter.cs
- EventLogEntryCollection.cs
- IgnoreFlushAndCloseStream.cs
- DataGridRow.cs
- TeredoHelper.cs
- DetailsViewRow.cs
- CodeDomConfigurationHandler.cs
- LingerOption.cs
- BinarySerializer.cs
- ListMarkerLine.cs
- MsmqTransportElement.cs
- ClientEndpointLoader.cs
- SslStream.cs
- StandardToolWindows.cs
- ArrayConverter.cs
- XmlTextReaderImpl.cs
- DataReceivedEventArgs.cs
- Button.cs
- Themes.cs
- TdsValueSetter.cs
- DetailsViewRowCollection.cs
- Polyline.cs
- xamlnodes.cs
- DateTimePicker.cs
- AccessDataSource.cs
- ToggleButtonAutomationPeer.cs
- Message.cs
- DefaultSettingsSection.cs
- Label.cs
- MailWebEventProvider.cs
- RadioButton.cs
- TextFormatterImp.cs
- CssClassPropertyAttribute.cs
- PropertyKey.cs
- GroupBox.cs
- EastAsianLunisolarCalendar.cs
- ByteAnimationUsingKeyFrames.cs
- RadioButtonPopupAdapter.cs
- PtsCache.cs
- AstNode.cs
- VBIdentifierName.cs
- DataKeyCollection.cs
- CriticalExceptions.cs
- OutputCacheModule.cs
- IntegrationExceptionEventArgs.cs