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
- AutomationIdentifierGuids.cs
- UpDownBaseDesigner.cs
- CultureInfoConverter.cs
- SendKeys.cs
- EditorPart.cs
- ByteStack.cs
- SkewTransform.cs
- ToolStripDropDownDesigner.cs
- EncoderFallback.cs
- FrameworkElement.cs
- ManipulationPivot.cs
- DataSourceControl.cs
- ListSortDescriptionCollection.cs
- PointLightBase.cs
- StrongName.cs
- ReverseComparer.cs
- ProcessModuleCollection.cs
- CachedBitmap.cs
- ArgumentFixer.cs
- ListViewTableCell.cs
- IList.cs
- TableLayoutStyle.cs
- CalendarTable.cs
- IPHostEntry.cs
- HttpConfigurationContext.cs
- SQLRoleProvider.cs
- FormsAuthenticationUser.cs
- OleDbWrapper.cs
- OutArgumentConverter.cs
- XPathChildIterator.cs
- UnconditionalPolicy.cs
- BindingList.cs
- LinkArea.cs
- CommandConverter.cs
- UInt32Storage.cs
- EmptyStringExpandableObjectConverter.cs
- PathTooLongException.cs
- PackWebRequest.cs
- SafeHandle.cs
- RoutedEvent.cs
- WebPartChrome.cs
- RectangleGeometry.cs
- AnnotationHighlightLayer.cs
- ThreadAttributes.cs
- InputBindingCollection.cs
- FileDialogCustomPlace.cs
- Publisher.cs
- MD5CryptoServiceProvider.cs
- DataGridColumnHeadersPresenter.cs
- SystemIcmpV6Statistics.cs
- SoapReflector.cs
- ScriptHandlerFactory.cs
- FixedSOMTextRun.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- HtmlMeta.cs
- Int32CAMarshaler.cs
- PaperSize.cs
- GC.cs
- ReadOnlyPropertyMetadata.cs
- AssertSection.cs
- FormsAuthentication.cs
- BooleanConverter.cs
- CorrelationInitializer.cs
- DbTransaction.cs
- Menu.cs
- ContentElement.cs
- ProvidersHelper.cs
- SqlUdtInfo.cs
- NameNode.cs
- ToolStripDropDownMenu.cs
- ListViewItemEventArgs.cs
- InternalControlCollection.cs
- KnownBoxes.cs
- COM2ComponentEditor.cs
- DataBoundControl.cs
- EditorAttribute.cs
- ConnectionPointConverter.cs
- Closure.cs
- CountdownEvent.cs
- Codec.cs
- ScrollChangedEventArgs.cs
- ControlCachePolicy.cs
- PartialClassGenerationTask.cs
- UInt32.cs
- Command.cs
- PenContexts.cs
- EdmEntityTypeAttribute.cs
- TypeUsageBuilder.cs
- ArraySortHelper.cs
- MemoryPressure.cs
- XmlSchemaException.cs
- Parameter.cs
- CompleteWizardStep.cs
- TableLayoutPanel.cs
- Tablet.cs
- StorageEndPropertyMapping.cs
- UnaryNode.cs
- SqlBulkCopyColumnMapping.cs
- CharEntityEncoderFallback.cs
- QueryStringConverter.cs