Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- PointLightBase.cs
- RoleGroup.cs
- Int32CollectionConverter.cs
- ChangesetResponse.cs
- ProfileEventArgs.cs
- SupportsEventValidationAttribute.cs
- XmlSchemaDocumentation.cs
- DesignerAdapterAttribute.cs
- DockPattern.cs
- WindowsListViewItem.cs
- NetworkInterface.cs
- SourceFileInfo.cs
- FontConverter.cs
- BrowserDefinition.cs
- XmlUTF8TextReader.cs
- SqlClientFactory.cs
- ControllableStoryboardAction.cs
- SectionXmlInfo.cs
- ContentOperations.cs
- LinearQuaternionKeyFrame.cs
- Int16.cs
- Base64WriteStateInfo.cs
- OleStrCAMarshaler.cs
- DataServiceQueryOfT.cs
- HtmlFormWrapper.cs
- HandledMouseEvent.cs
- WebUtil.cs
- PropertyPathWorker.cs
- ClientSettingsProvider.cs
- MaterialGroup.cs
- SQLByteStorage.cs
- AppearanceEditorPart.cs
- ReflectionUtil.cs
- Permission.cs
- AttachInfo.cs
- RotateTransform3D.cs
- PropertyOverridesTypeEditor.cs
- AdCreatedEventArgs.cs
- LineSegment.cs
- AnnotationService.cs
- SynchronizedInputHelper.cs
- ACL.cs
- AdornedElementPlaceholder.cs
- DataKeyCollection.cs
- RadioButtonRenderer.cs
- _LoggingObject.cs
- CachedPathData.cs
- IdnMapping.cs
- DataGridRowHeader.cs
- PasswordRecoveryAutoFormat.cs
- Menu.cs
- DrawListViewSubItemEventArgs.cs
- TypeLibConverter.cs
- GridViewColumnHeaderAutomationPeer.cs
- SQLStringStorage.cs
- ImageConverter.cs
- XmlEncodedRawTextWriter.cs
- TextEffect.cs
- ActivityValidationServices.cs
- TableTextElementCollectionInternal.cs
- ListViewPagedDataSource.cs
- ErasingStroke.cs
- FontFamily.cs
- Console.cs
- XmlNavigatorStack.cs
- ItemChangedEventArgs.cs
- TimeSpanSecondsConverter.cs
- DataSourceNameHandler.cs
- SAPICategories.cs
- DebugView.cs
- SchemaObjectWriter.cs
- DesignerAdapterUtil.cs
- XamlSerializationHelper.cs
- EventsTab.cs
- EnumValAlphaComparer.cs
- DataContext.cs
- FlowPosition.cs
- AuthenticatingEventArgs.cs
- NewArrayExpression.cs
- DataGridTextBoxColumn.cs
- FormsAuthenticationEventArgs.cs
- ProcessInfo.cs
- HwndSourceKeyboardInputSite.cs
- DeflateStream.cs
- filewebresponse.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- WindowsTitleBar.cs
- RoleBoolean.cs
- ConfigurationSchemaErrors.cs
- FileIOPermission.cs
- AppDomainUnloadedException.cs
- OneOf.cs
- NameSpaceEvent.cs
- GradientStop.cs
- NetMsmqSecurityMode.cs
- TdsParser.cs
- FontUnit.cs
- ConfigXmlAttribute.cs
- Empty.cs
- AssociationType.cs