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
- ToolStripSeparator.cs
- DesignerSerializerAttribute.cs
- WebBaseEventKeyComparer.cs
- BufferedGraphics.cs
- LocatorGroup.cs
- IPHostEntry.cs
- StringArrayConverter.cs
- CodeCommentStatement.cs
- WebContentFormatHelper.cs
- GeneralTransform3DTo2D.cs
- TemplateParser.cs
- RootBuilder.cs
- JsonStringDataContract.cs
- ByteRangeDownloader.cs
- ColorContext.cs
- List.cs
- RedistVersionInfo.cs
- SHA1CryptoServiceProvider.cs
- Column.cs
- EdgeProfileValidation.cs
- ProcessHost.cs
- UpdateEventArgs.cs
- SurrogateSelector.cs
- NamespaceDecl.cs
- MethodToken.cs
- MetaModel.cs
- HtmlSelect.cs
- XPathSelfQuery.cs
- TypedReference.cs
- ZipIOFileItemStream.cs
- DataGridViewAutoSizeModeEventArgs.cs
- AuthorizationRule.cs
- SqlDataRecord.cs
- IMembershipProvider.cs
- TagPrefixAttribute.cs
- embossbitmapeffect.cs
- GridToolTip.cs
- Gdiplus.cs
- SqlTypesSchemaImporter.cs
- BooleanSwitch.cs
- ProxyHelper.cs
- DataGridViewRowStateChangedEventArgs.cs
- StringHelper.cs
- InplaceBitmapMetadataWriter.cs
- EnumerableRowCollectionExtensions.cs
- UnitySerializationHolder.cs
- path.cs
- FileDialogCustomPlaces.cs
- ProfileServiceManager.cs
- HttpClientCertificate.cs
- Attributes.cs
- ToolStripItemTextRenderEventArgs.cs
- DataBoundControlHelper.cs
- Qualifier.cs
- PersistChildrenAttribute.cs
- ImageBrush.cs
- FrugalList.cs
- DynamicExpression.cs
- Message.cs
- StateDesigner.LayoutSelectionGlyph.cs
- RelatedPropertyManager.cs
- SupportingTokenAuthenticatorSpecification.cs
- xmlfixedPageInfo.cs
- DesignerTextWriter.cs
- JournalNavigationScope.cs
- Location.cs
- PropVariant.cs
- RowBinding.cs
- XmlTextReaderImplHelpers.cs
- backend.cs
- DesignerRegionCollection.cs
- HtmlMeta.cs
- GlyphingCache.cs
- DelegatedStream.cs
- InternalPermissions.cs
- PlainXmlWriter.cs
- KoreanCalendar.cs
- ContextQuery.cs
- ISCIIEncoding.cs
- HttpPostedFileBase.cs
- GenericPrincipal.cs
- sqlnorm.cs
- _CommandStream.cs
- SQLDoubleStorage.cs
- SQLSingleStorage.cs
- GregorianCalendarHelper.cs
- MemberCollection.cs
- InstallerTypeAttribute.cs
- _RegBlobWebProxyDataBuilder.cs
- PolicyLevel.cs
- CommandManager.cs
- ContentWrapperAttribute.cs
- PolicyManager.cs
- DefaultValueConverter.cs
- DataGridViewDataConnection.cs
- TextRangeAdaptor.cs
- TypeGeneratedEventArgs.cs
- sqlinternaltransaction.cs
- Image.cs
- TableColumn.cs