Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ItemContainerGenerator.cs
- ComponentResourceManager.cs
- ACL.cs
- GridLengthConverter.cs
- ArgumentException.cs
- DelegateCompletionCallbackWrapper.cs
- XmlSchemaAnnotation.cs
- ConnectionPointCookie.cs
- TextEmbeddedObject.cs
- OutOfProcStateClientManager.cs
- DispatcherFrame.cs
- HtmlAnchor.cs
- CryptoConfig.cs
- WindowsContainer.cs
- Trace.cs
- SchemaCollectionCompiler.cs
- Blend.cs
- PixelFormats.cs
- DocumentSequence.cs
- MemberAccessException.cs
- XmlKeywords.cs
- DataColumnMapping.cs
- ControlPropertyNameConverter.cs
- ColumnWidthChangingEvent.cs
- CacheAxisQuery.cs
- FrameworkObject.cs
- ViewStateException.cs
- CategoryNameCollection.cs
- DataSourceCacheDurationConverter.cs
- ContentElement.cs
- FilterUserControlBase.cs
- FontEmbeddingManager.cs
- XmlSchemaSimpleTypeRestriction.cs
- RC2CryptoServiceProvider.cs
- RecordsAffectedEventArgs.cs
- EntityViewContainer.cs
- ManualResetEvent.cs
- HttpRuntimeSection.cs
- Slider.cs
- sqlmetadatafactory.cs
- Selection.cs
- ArithmeticException.cs
- DeleteMemberBinder.cs
- XamlWriter.cs
- SqlUserDefinedAggregateAttribute.cs
- RadioButton.cs
- StateMachineWorkflowDesigner.cs
- DiscoveryClientDuplexChannel.cs
- DataGridItemAttachedStorage.cs
- FontDialog.cs
- BuildProvider.cs
- SymbolTable.cs
- DictionaryEntry.cs
- HttpSessionStateBase.cs
- BindingContext.cs
- CalendarDesigner.cs
- StubHelpers.cs
- ClientSession.cs
- SpecularMaterial.cs
- ValidationSummary.cs
- SortKey.cs
- WsatServiceAddress.cs
- EditBehavior.cs
- FixedSOMContainer.cs
- AuthenticationModulesSection.cs
- XmlSchemaObjectTable.cs
- LinearGradientBrush.cs
- CompiledQueryCacheEntry.cs
- AdornerDecorator.cs
- MemberHolder.cs
- ProfileModule.cs
- ProviderSettingsCollection.cs
- RuleSettingsCollection.cs
- ComponentSerializationService.cs
- TimelineGroup.cs
- Literal.cs
- Overlapped.cs
- ITreeGenerator.cs
- XmlSigningNodeWriter.cs
- ColorPalette.cs
- UInt64Storage.cs
- IsolatedStorageSecurityState.cs
- ObjectViewFactory.cs
- HashHelper.cs
- ListViewGroup.cs
- XmlWriter.cs
- PartialTrustHelpers.cs
- Int64KeyFrameCollection.cs
- WorkBatch.cs
- TimeoutException.cs
- SuppressMergeCheckAttribute.cs
- MbpInfo.cs
- AdRotator.cs
- SiteMapDataSource.cs
- ImportedPolicyConversionContext.cs
- ElementMarkupObject.cs
- x509utils.cs
- DataServiceHost.cs
- MultipartIdentifier.cs
- shaperfactoryquerycachekey.cs