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
- ClientScriptItem.cs
- SuspendDesigner.cs
- ObjectQuery_EntitySqlExtensions.cs
- LoadedOrUnloadedOperation.cs
- DesignOnlyAttribute.cs
- ThreadStaticAttribute.cs
- DependentTransaction.cs
- SchemaCollectionCompiler.cs
- DesignerTransactionCloseEvent.cs
- KeyInstance.cs
- PersonalizationAdministration.cs
- HyperLinkColumn.cs
- httpstaticobjectscollection.cs
- TemplateControlParser.cs
- EventBuilder.cs
- AsymmetricSignatureFormatter.cs
- BeginSelectCardRequest.cs
- CodeSnippetStatement.cs
- SqlDataSourceCustomCommandPanel.cs
- TableLayoutSettingsTypeConverter.cs
- BinaryObjectWriter.cs
- DesignerPerfEventProvider.cs
- InfoCardTraceRecord.cs
- CryptoProvider.cs
- TextTreeTextElementNode.cs
- MouseBinding.cs
- SymbolType.cs
- CommentAction.cs
- ComNativeDescriptor.cs
- PolyBezierSegmentFigureLogic.cs
- WebScriptMetadataFormatter.cs
- FontFamilyIdentifier.cs
- CfgRule.cs
- ControlAdapter.cs
- ActivityInstanceMap.cs
- MultiView.cs
- PolicyChain.cs
- VisualTreeHelper.cs
- WebBrowserPermission.cs
- Context.cs
- BulletedList.cs
- EventWaitHandleSecurity.cs
- ImageAutomationPeer.cs
- SystemIPv6InterfaceProperties.cs
- TypeDescriptor.cs
- ByteStreamGeometryContext.cs
- XmlDataProvider.cs
- HttpApplicationStateBase.cs
- KeyInterop.cs
- RtfToken.cs
- GradientStop.cs
- BaseCAMarshaler.cs
- AccessDataSource.cs
- Operator.cs
- ExpandableObjectConverter.cs
- PageFunction.cs
- StateMachineWorkflowDesigner.cs
- DiagnosticsConfigurationHandler.cs
- ToolStripHighContrastRenderer.cs
- CharKeyFrameCollection.cs
- Span.cs
- Matrix.cs
- TraceContextRecord.cs
- codemethodreferenceexpression.cs
- OrderedParallelQuery.cs
- Membership.cs
- OletxVolatileEnlistment.cs
- counter.cs
- PreservationFileWriter.cs
- IOThreadScheduler.cs
- CfgSemanticTag.cs
- WebSysDefaultValueAttribute.cs
- TrackingConditionCollection.cs
- SmtpMail.cs
- XPathMultyIterator.cs
- LinearGradientBrush.cs
- ObjectManager.cs
- ReferenceEqualityComparer.cs
- StructureChangedEventArgs.cs
- ServiceModelEnumValidator.cs
- ListBindingConverter.cs
- WeakReadOnlyCollection.cs
- TextBox.cs
- ImageIndexConverter.cs
- CodeAttributeArgumentCollection.cs
- GetPageCompletedEventArgs.cs
- SchemaElement.cs
- ClipboardData.cs
- EventHandlerList.cs
- MsmqHostedTransportConfiguration.cs
- ForEachAction.cs
- coordinatorfactory.cs
- DataControlImageButton.cs
- ManipulationDevice.cs
- NullReferenceException.cs
- CatalogPartChrome.cs
- ConfigurationSettings.cs
- OutputWindow.cs
- WasHttpHandlersInstallComponent.cs
- AuthenticationManager.cs