Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ConfigurationCollectionAttribute.cs / 1 / ConfigurationCollectionAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; using System.Configuration; namespace System.Configuration { // This attribute is expected on section properties of type derivied from ConfigurationElementCollection // or on the itself [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] public sealed class ConfigurationCollectionAttribute : Attribute { private string _addItemName = null; private string _removeItemName = null; private string _clearItemsName = null; private Type _itemType = null; private ConfigurationElementCollectionType _collectionType = ConfigurationElementCollectionType.AddRemoveClearMap; public ConfigurationCollectionAttribute(Type itemType) { if (itemType == null) { throw new ArgumentNullException("itemType"); } _itemType = itemType; } public Type ItemType { get { return _itemType; } } public string AddItemName { get { if (_addItemName == null) { return ConfigurationElementCollection.DefaultAddItemName; } else { return _addItemName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _addItemName = value; } } public string RemoveItemName { get { if (_removeItemName == null) { return ConfigurationElementCollection.DefaultRemoveItemName; } else { return _removeItemName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _removeItemName = value; } } public string ClearItemsName { get { if (_clearItemsName == null) { return ConfigurationElementCollection.DefaultClearItemsName; } else { return _clearItemsName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _clearItemsName = value; } } public ConfigurationElementCollectionType CollectionType { get { return _collectionType; } set { _collectionType = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration.Internal; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Security.Permissions; using System.Xml; using System.Globalization; using System.ComponentModel; using System.Security; using System.Text; using System.Configuration; namespace System.Configuration { // This attribute is expected on section properties of type derivied from ConfigurationElementCollection // or on the itself [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] public sealed class ConfigurationCollectionAttribute : Attribute { private string _addItemName = null; private string _removeItemName = null; private string _clearItemsName = null; private Type _itemType = null; private ConfigurationElementCollectionType _collectionType = ConfigurationElementCollectionType.AddRemoveClearMap; public ConfigurationCollectionAttribute(Type itemType) { if (itemType == null) { throw new ArgumentNullException("itemType"); } _itemType = itemType; } public Type ItemType { get { return _itemType; } } public string AddItemName { get { if (_addItemName == null) { return ConfigurationElementCollection.DefaultAddItemName; } else { return _addItemName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _addItemName = value; } } public string RemoveItemName { get { if (_removeItemName == null) { return ConfigurationElementCollection.DefaultRemoveItemName; } else { return _removeItemName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _removeItemName = value; } } public string ClearItemsName { get { if (_clearItemsName == null) { return ConfigurationElementCollection.DefaultClearItemsName; } else { return _clearItemsName; } } set { if (string.IsNullOrEmpty(value)) { value = null; } _clearItemsName = value; } } public ConfigurationElementCollectionType CollectionType { get { return _collectionType; } set { _collectionType = 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
- LocalClientSecuritySettings.cs
- PointConverter.cs
- DataGridViewCellValueEventArgs.cs
- DataSourceProvider.cs
- ProxyDataContractResolver.cs
- MetadataFile.cs
- ImageCodecInfoPrivate.cs
- IsolatedStoragePermission.cs
- ClusterRegistryConfigurationProvider.cs
- DataRelation.cs
- ModelFunctionTypeElement.cs
- SerTrace.cs
- ExpressionBuilder.cs
- ProcessModelInfo.cs
- SmtpReplyReader.cs
- SymbolMethod.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- WindowsPrincipal.cs
- ApplicationFileParser.cs
- XsltQilFactory.cs
- ConditionalBranch.cs
- TextFindEngine.cs
- XsltException.cs
- CreatingCookieEventArgs.cs
- DesignerAttribute.cs
- PlatformNotSupportedException.cs
- Property.cs
- Geometry.cs
- CodeTypeReferenceExpression.cs
- XmlComment.cs
- DataSourceSelectArguments.cs
- DateTimeStorage.cs
- TextTreeTextElementNode.cs
- SqlDataRecord.cs
- ContentElementAutomationPeer.cs
- QueueNameHelper.cs
- NamespaceCollection.cs
- Parsers.cs
- GeneralTransform2DTo3DTo2D.cs
- SchemaComplexType.cs
- DescriptionAttribute.cs
- MultiBindingExpression.cs
- LinkArea.cs
- TextLine.cs
- AccessText.cs
- HashCryptoHandle.cs
- HexParser.cs
- EffectiveValueEntry.cs
- FormatControl.cs
- HttpResponse.cs
- PropertyDescriptor.cs
- QueryStatement.cs
- LoadItemsEventArgs.cs
- FilterException.cs
- TypeLoadException.cs
- FormViewCommandEventArgs.cs
- IntegerFacetDescriptionElement.cs
- ImageCollectionEditor.cs
- ImageFormatConverter.cs
- CharStorage.cs
- IPAddress.cs
- IdentityReference.cs
- DataGridViewCellMouseEventArgs.cs
- DefaultAsyncDataDispatcher.cs
- _ProxyChain.cs
- XslNumber.cs
- ValidationError.cs
- BitmapEffectDrawing.cs
- SqlServer2KCompatibilityAnnotation.cs
- InstanceKeyCollisionException.cs
- WebPartConnectionsDisconnectVerb.cs
- SetterBaseCollection.cs
- ProcessThread.cs
- ShaperBuffers.cs
- HtmlInputText.cs
- ReachFixedPageSerializerAsync.cs
- DeclarationUpdate.cs
- SafeLocalMemHandle.cs
- TableChangeProcessor.cs
- UnknownBitmapEncoder.cs
- CommandLibraryHelper.cs
- PenLineJoinValidation.cs
- LogSwitch.cs
- DataStorage.cs
- CallTemplateAction.cs
- FastEncoderWindow.cs
- MeshGeometry3D.cs
- ResourcePart.cs
- HostProtectionException.cs
- DetectEofStream.cs
- SocketException.cs
- MessageContractAttribute.cs
- ControlHelper.cs
- MissingSatelliteAssemblyException.cs
- Operand.cs
- OptionalRstParameters.cs
- EditorPartChrome.cs
- XslCompiledTransform.cs
- ImageConverter.cs
- UITypeEditors.cs