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
- XmlDictionaryString.cs
- SqlRewriteScalarSubqueries.cs
- TransformerInfoCollection.cs
- XPathDocumentNavigator.cs
- SelectionItemPatternIdentifiers.cs
- BackStopAuthenticationModule.cs
- ParsedAttributeCollection.cs
- Property.cs
- WorkerRequest.cs
- TextEffect.cs
- CellQuery.cs
- MetadataItem.cs
- StoreItemCollection.Loader.cs
- RuntimeConfig.cs
- CollectionExtensions.cs
- FixedStringLookup.cs
- Matrix3D.cs
- FontStyle.cs
- HttpWriter.cs
- PlatformCulture.cs
- AsyncPostBackTrigger.cs
- TableAutomationPeer.cs
- StateWorkerRequest.cs
- RandomDelaySendsAsyncResult.cs
- XmlNodeReader.cs
- DesignerWebPartChrome.cs
- PackagePart.cs
- SQLDecimalStorage.cs
- ProfileEventArgs.cs
- SqlStream.cs
- RemoteWebConfigurationHost.cs
- Asn1Utilities.cs
- WindowsToolbarItemAsMenuItem.cs
- PathSegment.cs
- ScrollProperties.cs
- SystemIcmpV6Statistics.cs
- ObjectConverter.cs
- SqlDataSource.cs
- PageRequestManager.cs
- RtType.cs
- WhileDesigner.cs
- XamlStream.cs
- MembershipValidatePasswordEventArgs.cs
- NativeCppClassAttribute.cs
- PenThreadPool.cs
- OleDbRowUpdatingEvent.cs
- TextFormatter.cs
- FakeModelItemImpl.cs
- webeventbuffer.cs
- BufferedReadStream.cs
- SystemColorTracker.cs
- EventPrivateKey.cs
- ProviderCollection.cs
- HtmlControlAdapter.cs
- X500Name.cs
- DescendentsWalker.cs
- ReadOnlyDataSource.cs
- ActivityMarkupSerializer.cs
- ReadWriteObjectLock.cs
- TypeGeneratedEventArgs.cs
- RoleManagerSection.cs
- GPPOINT.cs
- SvcMapFileSerializer.cs
- XmlSchemaIdentityConstraint.cs
- ScrollContentPresenter.cs
- SQLDouble.cs
- Baml6ConstructorInfo.cs
- PrintDialog.cs
- DtrList.cs
- MessagingDescriptionAttribute.cs
- EventlogProvider.cs
- DataGridViewColumnStateChangedEventArgs.cs
- ListViewDataItem.cs
- CodeTypeMemberCollection.cs
- StringSource.cs
- ProfileManager.cs
- XmlSchema.cs
- PlanCompiler.cs
- WindowsFormsHelpers.cs
- HostingEnvironmentException.cs
- MappingException.cs
- IntSecurity.cs
- Screen.cs
- Stroke2.cs
- SignerInfo.cs
- DataServiceQueryException.cs
- _DisconnectOverlappedAsyncResult.cs
- UnhandledExceptionEventArgs.cs
- RuntimeResourceSet.cs
- DataGridToolTip.cs
- HtmlElementCollection.cs
- WebBrowserSiteBase.cs
- ValueExpressions.cs
- Aggregates.cs
- ToolboxItemFilterAttribute.cs
- XmlSchemaParticle.cs
- ImageKeyConverter.cs
- OdbcConnection.cs
- HtmlInputControl.cs
- ScriptManagerProxy.cs