Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / xsp / System / Web / Extensions / Configuration / Converter.cs / 1 / 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
- XD.cs
- RewritingProcessor.cs
- PasswordDeriveBytes.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ClientType.cs
- SqlRetyper.cs
- PeerTransportBindingElement.cs
- TrackingQuery.cs
- _NegoStream.cs
- LiteralControl.cs
- Dynamic.cs
- ProjectionRewriter.cs
- Baml6Assembly.cs
- DataSourceView.cs
- HttpServerVarsCollection.cs
- TreeNodeBindingCollection.cs
- UITypeEditors.cs
- BlurBitmapEffect.cs
- TreeNodeMouseHoverEvent.cs
- InstanceKey.cs
- PropertySegmentSerializationProvider.cs
- URLIdentityPermission.cs
- AnnotationAdorner.cs
- ExpandCollapseProviderWrapper.cs
- XsltFunctions.cs
- BitmapMetadataEnumerator.cs
- ActivityCodeDomReferenceService.cs
- IsolatedStorageFile.cs
- safesecurityhelperavalon.cs
- CacheForPrimitiveTypes.cs
- DataFormat.cs
- IItemProperties.cs
- FunctionQuery.cs
- BitConverter.cs
- SecUtil.cs
- PlatformCulture.cs
- DesignerActionHeaderItem.cs
- MergeFilterQuery.cs
- RangeContentEnumerator.cs
- _ScatterGatherBuffers.cs
- AsymmetricKeyExchangeFormatter.cs
- OletxVolatileEnlistment.cs
- PropertyValueChangedEvent.cs
- WebPartDescription.cs
- XsdValidatingReader.cs
- TypeSource.cs
- Pointer.cs
- D3DImage.cs
- DateTimeOffset.cs
- UIAgentMonitorHandle.cs
- ColorConverter.cs
- FileDialogCustomPlaces.cs
- TextEditorThreadLocalStore.cs
- ButtonBase.cs
- ProfileManager.cs
- ToolStripPanelCell.cs
- StateWorkerRequest.cs
- XmlObjectSerializerWriteContextComplex.cs
- BamlLocalizableResource.cs
- DetailsViewUpdatedEventArgs.cs
- ByteKeyFrameCollection.cs
- OleDbRowUpdatingEvent.cs
- OrderedEnumerableRowCollection.cs
- AdvancedBindingEditor.cs
- ClientApiGenerator.cs
- ConnectionPoint.cs
- FullTrustAssembly.cs
- OraclePermission.cs
- XmlILTrace.cs
- EventSinkHelperWriter.cs
- XmlSerializableWriter.cs
- BaseEntityWrapper.cs
- WebPart.cs
- UidManager.cs
- CharAnimationBase.cs
- Message.cs
- XmlMapping.cs
- KeyedByTypeCollection.cs
- _NegoState.cs
- KeyToListMap.cs
- HandledMouseEvent.cs
- Aes.cs
- DataGrid.cs
- ValidationRule.cs
- FileUtil.cs
- XmlBinaryReader.cs
- ObjectDataSourceStatusEventArgs.cs
- _SingleItemRequestCache.cs
- ForeignKeyConstraint.cs
- DBParameter.cs
- XDRSchema.cs
- ApplyImportsAction.cs
- WebPartTransformer.cs
- Automation.cs
- SingleSelectRootGridEntry.cs
- RequestCacheValidator.cs
- WebPartChrome.cs
- SizeValueSerializer.cs
- BitmapEffect.cs
- XmlAnyElementAttributes.cs