Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Configuration / Converter.cs / 1305376 / 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.Web; 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.Web; 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
- OuterGlowBitmapEffect.cs
- QueryCacheEntry.cs
- MethodRental.cs
- RangeBaseAutomationPeer.cs
- DockPanel.cs
- ControlPager.cs
- processwaithandle.cs
- CachedCompositeFamily.cs
- ManagementPath.cs
- XmlSchemaNotation.cs
- ConnectionStringsExpressionBuilder.cs
- EditableRegion.cs
- StyleModeStack.cs
- BookmarkScope.cs
- MachineKeyConverter.cs
- KeyValuePair.cs
- Triplet.cs
- LinearGradientBrush.cs
- DataList.cs
- BuildProviderCollection.cs
- AmbientProperties.cs
- SerializationEventsCache.cs
- SwitchCase.cs
- MappingMetadataHelper.cs
- GCHandleCookieTable.cs
- MessageDesigner.cs
- Point3D.cs
- CodeTypeDelegate.cs
- ReplacementText.cs
- FunctionDescription.cs
- PropertyDescriptor.cs
- LoginView.cs
- SqlMethodTransformer.cs
- RoleManagerModule.cs
- altserialization.cs
- ListBindingHelper.cs
- KeyValueSerializer.cs
- HtmlUtf8RawTextWriter.cs
- MessageQueueTransaction.cs
- _Semaphore.cs
- EntityTypeBase.cs
- SqlXml.cs
- WebException.cs
- StoreConnection.cs
- PropertySet.cs
- ConsoleKeyInfo.cs
- HtmlButton.cs
- ProtocolInformationReader.cs
- ModuleBuilder.cs
- DbConnectionOptions.cs
- CodeTypeReference.cs
- EntityFunctions.cs
- _CommandStream.cs
- PreviewPageInfo.cs
- ObjectDataSource.cs
- LinkDescriptor.cs
- IApplicationTrustManager.cs
- UnknownBitmapDecoder.cs
- TextTreePropertyUndoUnit.cs
- Processor.cs
- WebPartCatalogCloseVerb.cs
- DocumentGridContextMenu.cs
- TdsParser.cs
- SpnegoTokenAuthenticator.cs
- DataBindEngine.cs
- XmlSerializerOperationBehavior.cs
- GenerateScriptTypeAttribute.cs
- DecimalConstantAttribute.cs
- SiteMapNodeItem.cs
- FileDialog_Vista_Interop.cs
- ServiceBusyException.cs
- ResourceIDHelper.cs
- NativeRecognizer.cs
- HttpCachePolicyWrapper.cs
- HttpInputStream.cs
- UpdateCommand.cs
- RelationshipDetailsRow.cs
- CodeMethodReturnStatement.cs
- SqlPersonalizationProvider.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- CodeObjectCreateExpression.cs
- EntityContainer.cs
- DataServiceKeyAttribute.cs
- Annotation.cs
- DSACryptoServiceProvider.cs
- FixedTextBuilder.cs
- HtmlElementCollection.cs
- MetafileHeaderEmf.cs
- ReturnEventArgs.cs
- SecurityResources.cs
- URLIdentityPermission.cs
- Types.cs
- DateTimeConstantAttribute.cs
- IxmlLineInfo.cs
- NavigationWindowAutomationPeer.cs
- StringArrayConverter.cs
- ViewStateModeByIdAttribute.cs
- DataExpression.cs
- WebPartExportVerb.cs
- StyleSheetComponentEditor.cs