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
- PageWrapper.cs
- Stackframe.cs
- TypeElementCollection.cs
- ClipboardProcessor.cs
- MemberDescriptor.cs
- FastPropertyAccessor.cs
- EditingCommands.cs
- QueryCacheEntry.cs
- Literal.cs
- RootBuilder.cs
- TaskExceptionHolder.cs
- DataRowCollection.cs
- SqlDataSourceCustomCommandPanel.cs
- RelationshipNavigation.cs
- ContentType.cs
- Bitmap.cs
- XmlQuerySequence.cs
- CodeDOMUtility.cs
- FlowSwitchLink.cs
- LingerOption.cs
- BufferedWebEventProvider.cs
- ValidationErrorEventArgs.cs
- Decorator.cs
- PeerUnsafeNativeMethods.cs
- TdsEnums.cs
- TableChangeProcessor.cs
- StringHandle.cs
- CngProvider.cs
- ParentQuery.cs
- XPathScanner.cs
- ObjectStateFormatter.cs
- NativeMethodsCLR.cs
- Emitter.cs
- PersonalizationProviderHelper.cs
- FontWeightConverter.cs
- SapiAttributeParser.cs
- ObjectSerializerFactory.cs
- XNodeNavigator.cs
- HttpCapabilitiesSectionHandler.cs
- State.cs
- Single.cs
- DataGridViewHeaderCell.cs
- ExtensionFile.cs
- OptionUsage.cs
- MembershipValidatePasswordEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- SevenBitStream.cs
- SqlUserDefinedTypeAttribute.cs
- LinkDescriptor.cs
- ColorConverter.cs
- WorkerRequest.cs
- TabRenderer.cs
- ExpressionBindingCollection.cs
- MetadataException.cs
- CheckBoxPopupAdapter.cs
- CategoryAttribute.cs
- Drawing.cs
- OrderingExpression.cs
- AppDomainFactory.cs
- BuildProvider.cs
- TypefaceMap.cs
- ServiceRoute.cs
- XmlnsCompatibleWithAttribute.cs
- SudsWriter.cs
- FileDialog_Vista_Interop.cs
- __FastResourceComparer.cs
- NavigateEvent.cs
- Crc32.cs
- XamlBrushSerializer.cs
- PersistenceMetadataNamespace.cs
- DataGridColumnCollection.cs
- PerformanceCounterCategory.cs
- TableHeaderCell.cs
- HttpListenerRequest.cs
- keycontainerpermission.cs
- ApplicationId.cs
- ProgressChangedEventArgs.cs
- GenericWebPart.cs
- DisplayMemberTemplateSelector.cs
- autovalidator.cs
- LogLogRecordHeader.cs
- OdbcParameterCollection.cs
- DataSourceProvider.cs
- UdpTransportSettings.cs
- DLinqAssociationProvider.cs
- RequestContextBase.cs
- TypeForwardedToAttribute.cs
- DispatcherOperation.cs
- FileController.cs
- XpsFontSerializationService.cs
- DBCSCodePageEncoding.cs
- RequestNavigateEventArgs.cs
- XmlProcessingInstruction.cs
- UInt16Converter.cs
- SplitterEvent.cs
- SystemIPInterfaceProperties.cs
- DocumentCollection.cs
- ThemeableAttribute.cs
- SequentialActivityDesigner.cs
- HistoryEventArgs.cs