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
- ArrayElementGridEntry.cs
- ToolboxControl.cs
- UpdatableWrapper.cs
- EditorZoneBase.cs
- Int16KeyFrameCollection.cs
- FontStretchConverter.cs
- DisposableCollectionWrapper.cs
- SynchronizedDispatch.cs
- MsmqInputChannelBase.cs
- BuildResultCache.cs
- RbTree.cs
- AlternateViewCollection.cs
- EventLogTraceListener.cs
- EventWaitHandle.cs
- ZoomingMessageFilter.cs
- PropertyChangeTracker.cs
- RuleValidation.cs
- RadioButtonList.cs
- DataGridViewCellParsingEventArgs.cs
- QualifiedCellIdBoolean.cs
- Variable.cs
- SqlDataAdapter.cs
- CalendarButton.cs
- HtmlToClrEventProxy.cs
- FileSecurity.cs
- ScriptControlManager.cs
- OutputCacheSettings.cs
- CustomCategoryAttribute.cs
- AdjustableArrowCap.cs
- fixedPageContentExtractor.cs
- ScrollableControlDesigner.cs
- Group.cs
- GeneratedCodeAttribute.cs
- XsltLoader.cs
- XmlProcessingInstruction.cs
- SettingsSavedEventArgs.cs
- MemberAccessException.cs
- Tokenizer.cs
- SiteMapDataSourceDesigner.cs
- ToolStripItemBehavior.cs
- MediaElement.cs
- TypeConverterHelper.cs
- StringStorage.cs
- ColumnHeaderConverter.cs
- BitmapEffectRenderDataResource.cs
- AppearanceEditorPart.cs
- DataSpaceManager.cs
- GPPOINTF.cs
- Missing.cs
- Condition.cs
- Byte.cs
- AnimationLayer.cs
- OptimisticConcurrencyException.cs
- Visual3D.cs
- ControlEvent.cs
- DataGridViewSortCompareEventArgs.cs
- Visual3D.cs
- SettingsProviderCollection.cs
- MD5.cs
- Quack.cs
- TextOptions.cs
- WebRequest.cs
- ChtmlTextWriter.cs
- HwndAppCommandInputProvider.cs
- ObjectStorage.cs
- ConfigurationElement.cs
- StylusPointPropertyInfoDefaults.cs
- HttpCapabilitiesSectionHandler.cs
- DiffuseMaterial.cs
- OdbcConnectionOpen.cs
- TypefaceCollection.cs
- ColorAnimation.cs
- NativeMethods.cs
- ClientApiGenerator.cs
- DataGridViewSelectedColumnCollection.cs
- DbRetry.cs
- SchemaElementLookUpTable.cs
- Region.cs
- UseLicense.cs
- ObjectKeyFrameCollection.cs
- CheckBox.cs
- FillBehavior.cs
- RectConverter.cs
- ImageAutomationPeer.cs
- DataGridViewDesigner.cs
- TokenBasedSet.cs
- SoapAttributeOverrides.cs
- _Rfc2616CacheValidators.cs
- FocusManager.cs
- XmlNodeList.cs
- XmlWhitespace.cs
- EFColumnProvider.cs
- Deflater.cs
- PropertyChangingEventArgs.cs
- JsonClassDataContract.cs
- CodeDomSerializer.cs
- TextDecorationCollection.cs
- Directory.cs
- CompilerGeneratedAttribute.cs
- BaseCollection.cs