Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / Configuration / Converter.cs / 2 / Converter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.ComponentModel; using System.Configuration; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class Converter : ConfigurationElement { private static TypeConverter _whiteSpaceTrimStringConverter = new WhiteSpaceTrimStringConverter(); private static ConfigurationValidatorBase _nonEmptyStringValidator = new StringValidator(1); private static readonly ConfigurationProperty _propType = new ConfigurationProperty("type", typeof(string), null, _whiteSpaceTrimStringConverter, _nonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired); private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), null, _whiteSpaceTrimStringConverter, _nonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); private static ConfigurationPropertyCollection _properties = BuildProperties(); private static ConfigurationPropertyCollection BuildProperties() { ConfigurationPropertyCollection props = new ConfigurationPropertyCollection(); props.Add(_propType); props.Add(_propName); return props; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("type", IsRequired = true, DefaultValue = "")] [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Refers to a script element, not Object.GetType()")] [StringValidator(MinLength = 1)] public string Type { get { return (string)base[_propType]; } set { base[_propType] = value; } } [ConfigurationProperty("name", IsRequired = true, IsKey = true, DefaultValue = "")] [StringValidator(MinLength = 1)] public string Name { get { return (string)base[_propName]; } set { base[_propName] = value; } } } } // 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.ComponentModel; using System.Configuration; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class Converter : ConfigurationElement { private static TypeConverter _whiteSpaceTrimStringConverter = new WhiteSpaceTrimStringConverter(); private static ConfigurationValidatorBase _nonEmptyStringValidator = new StringValidator(1); private static readonly ConfigurationProperty _propType = new ConfigurationProperty("type", typeof(string), null, _whiteSpaceTrimStringConverter, _nonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired); private static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), null, _whiteSpaceTrimStringConverter, _nonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); private static ConfigurationPropertyCollection _properties = BuildProperties(); private static ConfigurationPropertyCollection BuildProperties() { ConfigurationPropertyCollection props = new ConfigurationPropertyCollection(); props.Add(_propType); props.Add(_propName); return props; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("type", IsRequired = true, DefaultValue = "")] [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Refers to a script element, not Object.GetType()")] [StringValidator(MinLength = 1)] public string Type { get { return (string)base[_propType]; } set { base[_propType] = value; } } [ConfigurationProperty("name", IsRequired = true, IsKey = true, DefaultValue = "")] [StringValidator(MinLength = 1)] public string Name { get { return (string)base[_propName]; } set { base[_propName] = value; } } } } // 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
- VectorAnimationBase.cs
- CopyNamespacesAction.cs
- DataBinding.cs
- ClassicBorderDecorator.cs
- RadioButton.cs
- Soap.cs
- LocalServiceSecuritySettingsElement.cs
- XmlHierarchicalDataSourceView.cs
- Transform3DGroup.cs
- StrongNameUtility.cs
- UriExt.cs
- NavigationProperty.cs
- BinHexDecoder.cs
- NextPreviousPagerField.cs
- PrintControllerWithStatusDialog.cs
- CollectionChangeEventArgs.cs
- MetadataWorkspace.cs
- Int16KeyFrameCollection.cs
- FloaterBaseParaClient.cs
- TextModifierScope.cs
- TextEndOfLine.cs
- Point4D.cs
- ArrayList.cs
- DragCompletedEventArgs.cs
- CodeMemberField.cs
- MailAddressCollection.cs
- EntitySqlQueryState.cs
- DBDataPermissionAttribute.cs
- DocumentCollection.cs
- UpdateCommand.cs
- TreeNodeCollection.cs
- PublishLicense.cs
- FactoryRecord.cs
- DotExpr.cs
- RecordsAffectedEventArgs.cs
- ManagementClass.cs
- BitmapDecoder.cs
- LOSFormatter.cs
- Blend.cs
- UInt32Storage.cs
- ComplexLine.cs
- InvalidPropValue.cs
- AddValidationError.cs
- XPathChildIterator.cs
- RefreshPropertiesAttribute.cs
- ConfigUtil.cs
- RuntimeUtils.cs
- BitmapEffectInput.cs
- FormattedTextSymbols.cs
- FrameworkContentElement.cs
- HMAC.cs
- JumpList.cs
- ProfessionalColors.cs
- WorkflowRuntime.cs
- GridViewCommandEventArgs.cs
- AssociationEndMember.cs
- InstanceData.cs
- ScriptingWebServicesSectionGroup.cs
- DataGridViewBand.cs
- MetabaseReader.cs
- StylusEditingBehavior.cs
- EvidenceTypeDescriptor.cs
- DataColumnCollection.cs
- RuntimeHandles.cs
- messageonlyhwndwrapper.cs
- RegexNode.cs
- SharedDp.cs
- XD.cs
- ContentPlaceHolder.cs
- ContextMenuStrip.cs
- TypeExtensionConverter.cs
- RawStylusInputCustomDataList.cs
- DBSchemaRow.cs
- WebServiceEnumData.cs
- TextEffect.cs
- ExtendedProperty.cs
- EditorZoneBase.cs
- DataGridBeginningEditEventArgs.cs
- RemoteWebConfigurationHostServer.cs
- EntityDataSourceView.cs
- BuildProvider.cs
- TextUtf8RawTextWriter.cs
- ButtonPopupAdapter.cs
- TCEAdapterGenerator.cs
- AsyncResult.cs
- WindowsListViewGroupSubsetLink.cs
- UIPermission.cs
- SafePEFileHandle.cs
- UrlUtility.cs
- TdsParserStateObject.cs
- MsmqReceiveParameters.cs
- DesignTimeParseData.cs
- PrimitiveXmlSerializers.cs
- UIElementHelper.cs
- AuthenticationModulesSection.cs
- GCHandleCookieTable.cs
- DataControlFieldHeaderCell.cs
- GeometryModel3D.cs
- ServiceDescriptionSerializer.cs
- cache.cs