Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigurationCollectionAttribute.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Guid.cs
- Root.cs
- Invariant.cs
- EntityDataSourceColumn.cs
- RequestQueue.cs
- ExecutionContext.cs
- SoapIgnoreAttribute.cs
- SqlSelectStatement.cs
- DataGridColumnDropSeparator.cs
- TextHidden.cs
- SchemaDeclBase.cs
- Set.cs
- HandlerBase.cs
- __ComObject.cs
- FacetChecker.cs
- RegexGroup.cs
- UrlPropertyAttribute.cs
- InvalidProgramException.cs
- WebCategoryAttribute.cs
- XmlSchemaSimpleType.cs
- Visitors.cs
- HtmlTitle.cs
- NumericPagerField.cs
- RoleGroup.cs
- MobileListItem.cs
- DirectoryObjectSecurity.cs
- XmlNamespaceManager.cs
- List.cs
- ReadOnlyNameValueCollection.cs
- CryptoApi.cs
- ProfileGroupSettings.cs
- SymbolMethod.cs
- PersonalizationStateInfoCollection.cs
- AspNetSynchronizationContext.cs
- XmlSchemaAnyAttribute.cs
- ConvertEvent.cs
- EntityType.cs
- DBSqlParserColumnCollection.cs
- ToolTip.cs
- SafeProcessHandle.cs
- OutOfProcStateClientManager.cs
- SecurityKeyIdentifier.cs
- HttpHandlersSection.cs
- SecurityTimestamp.cs
- CreateBookmarkScope.cs
- SafeNativeMethods.cs
- MatchAttribute.cs
- NoPersistHandle.cs
- EntityViewGenerationAttribute.cs
- BorderGapMaskConverter.cs
- Int32Converter.cs
- AnnotationStore.cs
- SqlInternalConnectionTds.cs
- BitmapImage.cs
- ObjectQueryState.cs
- SqlUdtInfo.cs
- CustomCredentialPolicy.cs
- NativeMethods.cs
- AngleUtil.cs
- PageContentAsyncResult.cs
- FunctionNode.cs
- DSACryptoServiceProvider.cs
- Mappings.cs
- HttpValueCollection.cs
- AlignmentYValidation.cs
- FileInfo.cs
- TargetFrameworkAttribute.cs
- DeadCharTextComposition.cs
- NameValueConfigurationCollection.cs
- PropertyTabAttribute.cs
- XsltException.cs
- ADMembershipUser.cs
- ObjectQuery.cs
- ModifierKeysValueSerializer.cs
- _ProxyChain.cs
- OleAutBinder.cs
- Authorization.cs
- HtmlInputRadioButton.cs
- Encoding.cs
- ListSortDescription.cs
- codemethodreferenceexpression.cs
- UpDownBase.cs
- RoutedEventArgs.cs
- SystemPens.cs
- HierarchicalDataSourceIDConverter.cs
- FrameworkContextData.cs
- WindowsGraphicsWrapper.cs
- returneventsaver.cs
- SafeIUnknown.cs
- WrappedKeySecurityToken.cs
- DbParameterCollection.cs
- CompensationDesigner.cs
- JapaneseLunisolarCalendar.cs
- UpDownBase.cs
- SessionStateContainer.cs
- SslStreamSecurityBindingElement.cs
- DESCryptoServiceProvider.cs
- SQLGuid.cs
- StylusEventArgs.cs
- CollectionViewGroupRoot.cs