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
- _IPv4Address.cs
- SizeFConverter.cs
- XmlSerializationReader.cs
- ConfigXmlCDataSection.cs
- XmlAttribute.cs
- CodeVariableDeclarationStatement.cs
- SplineKeyFrames.cs
- TableItemStyle.cs
- FontSizeConverter.cs
- ValueType.cs
- WorkflowMarkupSerializationException.cs
- RegexParser.cs
- AssociationTypeEmitter.cs
- IISMapPath.cs
- returneventsaver.cs
- SecurityKeyType.cs
- _AutoWebProxyScriptWrapper.cs
- RootAction.cs
- CardSpacePolicyElement.cs
- SqlInfoMessageEvent.cs
- SelectionProviderWrapper.cs
- RSATokenProvider.cs
- XmlDocumentFragment.cs
- ObjectItemNoOpAssemblyLoader.cs
- OrthographicCamera.cs
- Normalization.cs
- FieldToken.cs
- PointConverter.cs
- WebPartTracker.cs
- ContentType.cs
- Camera.cs
- ListenerServiceInstallComponent.cs
- _LocalDataStore.cs
- XdrBuilder.cs
- ScrollData.cs
- WindowsGraphics2.cs
- Constants.cs
- PrefixHandle.cs
- XsltInput.cs
- clipboard.cs
- Context.cs
- CqlParser.cs
- SchemaTypeEmitter.cs
- SharedPerformanceCounter.cs
- glyphs.cs
- LogReserveAndAppendState.cs
- OletxTransactionHeader.cs
- BitmapEffectCollection.cs
- Constraint.cs
- SrgsElement.cs
- ResourcesBuildProvider.cs
- ExtendedPropertiesHandler.cs
- AmbientProperties.cs
- CurrencyManager.cs
- XPathDocumentBuilder.cs
- RelationshipConverter.cs
- WebConfigurationManager.cs
- Size.cs
- TabPage.cs
- DocumentSequenceHighlightLayer.cs
- ExpressionNode.cs
- EndpointNameMessageFilter.cs
- GlobalDataBindingHandler.cs
- DataStorage.cs
- TransactionsSectionGroup.cs
- AutomationPropertyInfo.cs
- ClientScriptManager.cs
- DesignerTransactionCloseEvent.cs
- EntityClientCacheKey.cs
- FontStretch.cs
- Queue.cs
- IsolatedStorageFilePermission.cs
- RawStylusInputCustomDataList.cs
- StubHelpers.cs
- BigInt.cs
- SafeCryptContextHandle.cs
- Shape.cs
- PeerContact.cs
- ResolvedKeyFrameEntry.cs
- EasingQuaternionKeyFrame.cs
- ReceiveDesigner.xaml.cs
- PropertySourceInfo.cs
- GregorianCalendar.cs
- RemoteWebConfigurationHostServer.cs
- SyndicationSerializer.cs
- PrintingPermission.cs
- TextUtf8RawTextWriter.cs
- MailAddress.cs
- ProgressBarRenderer.cs
- XmlC14NWriter.cs
- ScriptHandlerFactory.cs
- TypeLoadException.cs
- AuthenticationManager.cs
- TreeViewDesigner.cs
- BigInt.cs
- LineGeometry.cs
- FixedSOMTable.cs
- HandleCollector.cs
- SHA1CryptoServiceProvider.cs
- DataGridViewImageCell.cs