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
- ModelPropertyImpl.cs
- LookupNode.cs
- XmlNamespaceManager.cs
- HierarchicalDataTemplate.cs
- PageThemeBuildProvider.cs
- EmissiveMaterial.cs
- UidManager.cs
- SocketAddress.cs
- WindowsBrush.cs
- Compiler.cs
- KeyNotFoundException.cs
- ResourceDisplayNameAttribute.cs
- Mappings.cs
- IsolatedStorageFilePermission.cs
- TextElementEditingBehaviorAttribute.cs
- SendActivity.cs
- BehaviorEditorPart.cs
- RecognizerStateChangedEventArgs.cs
- InvalidEnumArgumentException.cs
- ScriptingJsonSerializationSection.cs
- ObjectSecurity.cs
- QualifiedCellIdBoolean.cs
- DataPointer.cs
- OdbcRowUpdatingEvent.cs
- FileLoadException.cs
- AssemblyInfo.cs
- BasicBrowserDialog.cs
- ComponentChangedEvent.cs
- NetSectionGroup.cs
- DeflateStream.cs
- CharacterHit.cs
- HttpApplication.cs
- OleDbParameterCollection.cs
- StorageEntitySetMapping.cs
- InfoCardRequestException.cs
- AttributeExtensions.cs
- TextMarkerSource.cs
- TcpTransportSecurityElement.cs
- SortedList.cs
- remotingproxy.cs
- BooleanFunctions.cs
- UrlMapping.cs
- DataColumnCollection.cs
- AesCryptoServiceProvider.cs
- CacheMemory.cs
- AsyncOperationManager.cs
- StronglyTypedResourceBuilder.cs
- TableLayoutPanel.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ColumnPropertiesGroup.cs
- DataGridViewHitTestInfo.cs
- Simplifier.cs
- TextEditor.cs
- Exceptions.cs
- ToolboxService.cs
- RemotingConfiguration.cs
- XmlSchemaGroupRef.cs
- TransactionManagerProxy.cs
- TagNameToTypeMapper.cs
- SingleObjectCollection.cs
- CategoryNameCollection.cs
- SafeCryptoHandles.cs
- TableProviderWrapper.cs
- WebResourceAttribute.cs
- SizeConverter.cs
- XomlCompilerError.cs
- PropertyCondition.cs
- ISAPIRuntime.cs
- IsolatedStorageException.cs
- CodeGenerationManager.cs
- BamlMapTable.cs
- ListBase.cs
- RijndaelManagedTransform.cs
- XmlAttributeCollection.cs
- AppDomainUnloadedException.cs
- AlphaSortedEnumConverter.cs
- ActionFrame.cs
- LogoValidationException.cs
- EditorAttribute.cs
- ValidateNames.cs
- GotoExpression.cs
- _NTAuthentication.cs
- GridViewDeleteEventArgs.cs
- SqlNodeAnnotation.cs
- IntegerValidatorAttribute.cs
- AccessDataSource.cs
- CompModSwitches.cs
- CqlLexerHelpers.cs
- EventlogProvider.cs
- SecurityException.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- RoutedEventValueSerializer.cs
- CompilerInfo.cs
- AssertFilter.cs
- VarInfo.cs
- DateTimeOffsetConverter.cs
- ObjectListFieldsPage.cs
- SettingsAttributes.cs
- AssemblySettingAttributes.cs
- DataGridTextBox.cs