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
- OleDbStruct.cs
- SafeFileMappingHandle.cs
- NameValueFileSectionHandler.cs
- CookieParameter.cs
- ScaleTransform3D.cs
- DataGridViewLinkColumn.cs
- InfoCardTrace.cs
- NotCondition.cs
- TraceSection.cs
- DrawingDrawingContext.cs
- MenuCommand.cs
- SpoolingTaskBase.cs
- WebPartDisplayModeCollection.cs
- CookieParameter.cs
- DataSourceProvider.cs
- XMLDiffLoader.cs
- WsdlBuildProvider.cs
- RootProfilePropertySettingsCollection.cs
- dataprotectionpermissionattribute.cs
- SingleAnimationBase.cs
- HttpClientCertificate.cs
- XmlSchemaComplexContentRestriction.cs
- AttributeProviderAttribute.cs
- Menu.cs
- Lease.cs
- WebSysDefaultValueAttribute.cs
- XmlDictionaryString.cs
- TextAdaptor.cs
- WebResourceAttribute.cs
- regiisutil.cs
- FixedStringLookup.cs
- DBDataPermissionAttribute.cs
- RectangleGeometry.cs
- UrlMapping.cs
- TemplatePropertyEntry.cs
- XmlDataSource.cs
- BitmapEncoder.cs
- _IPv4Address.cs
- HelpKeywordAttribute.cs
- X509Certificate.cs
- TextTreeUndoUnit.cs
- URLIdentityPermission.cs
- WebConfigurationManager.cs
- Int32RectConverter.cs
- QuaternionValueSerializer.cs
- PropertyGridEditorPart.cs
- AtlasWeb.Designer.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- CallbackValidatorAttribute.cs
- SortDescriptionCollection.cs
- SqlMetaData.cs
- ItemPager.cs
- PowerModeChangedEventArgs.cs
- ProcessThread.cs
- MulticastIPAddressInformationCollection.cs
- AuthorizationRuleCollection.cs
- Stack.cs
- ConfigXmlDocument.cs
- ParseElement.cs
- TranslateTransform3D.cs
- WindowInteropHelper.cs
- UnionCodeGroup.cs
- HtmlInputControl.cs
- ColorDialog.cs
- RequestQueue.cs
- HtmlHead.cs
- DesignerActionUI.cs
- ServiceHttpModule.cs
- DataContractJsonSerializerOperationFormatter.cs
- FixedTextSelectionProcessor.cs
- SqlReferenceCollection.cs
- Vector3DConverter.cs
- Range.cs
- GridViewColumn.cs
- IODescriptionAttribute.cs
- BamlRecordReader.cs
- basecomparevalidator.cs
- DotExpr.cs
- BitmapData.cs
- SafeCryptoHandles.cs
- _RequestCacheProtocol.cs
- ProfileSettingsCollection.cs
- WaitForChangedResult.cs
- HttpWebRequest.cs
- CollectionViewGroup.cs
- X509Utils.cs
- ClientCultureInfo.cs
- TypeHelpers.cs
- ExtensionQuery.cs
- DataGridViewAdvancedBorderStyle.cs
- TextServicesProperty.cs
- Merger.cs
- TableCell.cs
- RtfFormatStack.cs
- Comparer.cs
- CacheDependency.cs
- SqlCacheDependencySection.cs
- WindowsMenu.cs
- IdentityNotMappedException.cs
- BeginStoryboard.cs