Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- InputMethod.cs
- CalendarKeyboardHelper.cs
- Figure.cs
- DefaultValueTypeConverter.cs
- DateTimePicker.cs
- List.cs
- WebBrowserProgressChangedEventHandler.cs
- FtpRequestCacheValidator.cs
- DataViewSettingCollection.cs
- ToolStripInSituService.cs
- ObjectDataSourceSelectingEventArgs.cs
- ValueHandle.cs
- DataBindingCollection.cs
- RoleGroup.cs
- XmlSerializationGeneratedCode.cs
- ClassHandlersStore.cs
- Registry.cs
- SendParametersContent.cs
- ParagraphVisual.cs
- FormView.cs
- CompilerResults.cs
- PerfService.cs
- TaiwanCalendar.cs
- EntitySetBase.cs
- Choices.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- SHA384Managed.cs
- SelectedCellsCollection.cs
- ClientScriptManagerWrapper.cs
- StorageRoot.cs
- BehaviorEditorPart.cs
- NotifyInputEventArgs.cs
- ArgumentNullException.cs
- MultiBinding.cs
- ISessionStateStore.cs
- WorkflowControlClient.cs
- DockAndAnchorLayout.cs
- TextDecorationCollection.cs
- Timer.cs
- UniqueIdentifierService.cs
- safesecurityhelperavalon.cs
- StringResourceManager.cs
- ObjectHelper.cs
- Certificate.cs
- CheckBoxRenderer.cs
- TextRangeBase.cs
- EpmSourcePathSegment.cs
- SQLGuidStorage.cs
- ManagementOperationWatcher.cs
- RepeaterItemEventArgs.cs
- FileFormatException.cs
- CodeExporter.cs
- DictionaryGlobals.cs
- ValueConversionAttribute.cs
- Pointer.cs
- UserControlDocumentDesigner.cs
- Ref.cs
- PartManifestEntry.cs
- Fonts.cs
- SQLInt64.cs
- WebPartTransformer.cs
- Message.cs
- SqlNotificationEventArgs.cs
- TabControl.cs
- FragmentQuery.cs
- baseshape.cs
- BatchParser.cs
- MachineKeyConverter.cs
- CounterSet.cs
- SecurityDescriptor.cs
- ResourceProviderFactory.cs
- SizeFConverter.cs
- WebSysDisplayNameAttribute.cs
- ECDiffieHellman.cs
- TextChange.cs
- ProtocolsSection.cs
- webclient.cs
- WindowsPen.cs
- CompilationRelaxations.cs
- CommonProperties.cs
- ExternalCalls.cs
- XmlSchemaValidator.cs
- RedirectionProxy.cs
- SmiEventSink_DeferedProcessing.cs
- COM2IPerPropertyBrowsingHandler.cs
- Cursor.cs
- DataGridViewComboBoxColumn.cs
- Style.cs
- RemoteWebConfigurationHost.cs
- ProfileService.cs
- ShapingWorkspace.cs
- MemberInitExpression.cs
- CodePrimitiveExpression.cs
- CounterCreationData.cs
- XmlSchemaObjectTable.cs
- TimeZone.cs
- Journal.cs
- ErrorLog.cs
- DbConnectionFactory.cs
- LinkedResource.cs