Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextEmbeddedObject.cs
- SecUtil.cs
- DataGridViewUtilities.cs
- PolicyManager.cs
- SqlBulkCopyColumnMappingCollection.cs
- TypeValidationEventArgs.cs
- QueryableDataSourceEditData.cs
- GenericQueueSurrogate.cs
- CategoryAttribute.cs
- StringCollection.cs
- SoapAttributeAttribute.cs
- ServiceElement.cs
- ConnectionManagementElement.cs
- SQLInt16.cs
- DbSource.cs
- MemberListBinding.cs
- ConnectionPoolManager.cs
- PropertyAccessVisitor.cs
- WindowsFormsLinkLabel.cs
- XsdSchemaFileEditor.cs
- ADMembershipUser.cs
- OdbcFactory.cs
- ObjectAnimationBase.cs
- FullTextLine.cs
- GregorianCalendar.cs
- StrongNamePublicKeyBlob.cs
- Decoder.cs
- CallTemplateAction.cs
- TreeViewItemAutomationPeer.cs
- XpsFixedPageReaderWriter.cs
- XmlQueryStaticData.cs
- GenericIdentity.cs
- DecoderExceptionFallback.cs
- CredentialCache.cs
- SplitContainer.cs
- FlowThrottle.cs
- HttpPostedFileWrapper.cs
- TickBar.cs
- MsmqDiagnostics.cs
- BitmapInitialize.cs
- SerializationTrace.cs
- SchemaMapping.cs
- DataMisalignedException.cs
- ObjectIDGenerator.cs
- StretchValidation.cs
- UniqueIdentifierService.cs
- BuildProvider.cs
- Rules.cs
- Bidi.cs
- OleDbErrorCollection.cs
- ModelFunction.cs
- CategoryNameCollection.cs
- EventRecord.cs
- LabelLiteral.cs
- BrowserInteropHelper.cs
- OdbcTransaction.cs
- CapabilitiesState.cs
- Cursors.cs
- VersionPair.cs
- ScriptControlDescriptor.cs
- XmlHierarchicalEnumerable.cs
- FileEnumerator.cs
- wmiprovider.cs
- BitmapEffectInputConnector.cs
- InstanceData.cs
- OdbcCommand.cs
- StandardCommands.cs
- DefaultProxySection.cs
- XsdBuildProvider.cs
- MissingFieldException.cs
- SrgsDocumentParser.cs
- PeoplePickerWrapper.cs
- xmlsaver.cs
- InvalidComObjectException.cs
- SessionStateUtil.cs
- XmlSchemaSimpleType.cs
- CrossSiteScriptingValidation.cs
- SQLResource.cs
- ToolboxSnapDragDropEventArgs.cs
- DeviceSpecificChoice.cs
- RulePatternOps.cs
- Compiler.cs
- WebPartZone.cs
- DesignTimeType.cs
- CodeGenerator.cs
- CustomCategoryAttribute.cs
- FilterQuery.cs
- ThreadStaticAttribute.cs
- StateDesigner.Layouts.cs
- InvalidEnumArgumentException.cs
- WpfKnownMemberInvoker.cs
- RectConverter.cs
- UrlPath.cs
- ContainerControl.cs
- DesignerCatalogPartChrome.cs
- ContextStack.cs
- IDispatchConstantAttribute.cs
- FixedBufferAttribute.cs
- HScrollProperties.cs
- ResXResourceReader.cs