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
- SystemTcpConnection.cs
- EventManager.cs
- TcpAppDomainProtocolHandler.cs
- AuthenticationServiceManager.cs
- BrushMappingModeValidation.cs
- BitmapEncoder.cs
- WebSysDescriptionAttribute.cs
- HtmlTable.cs
- DataListItemCollection.cs
- LambdaCompiler.ControlFlow.cs
- DSACryptoServiceProvider.cs
- BrushMappingModeValidation.cs
- QilChoice.cs
- Misc.cs
- ControlAdapter.cs
- SerializationEventsCache.cs
- MulticastNotSupportedException.cs
- WasHttpHandlersInstallComponent.cs
- TableAdapterManagerMethodGenerator.cs
- IdentityNotMappedException.cs
- Empty.cs
- SafeArrayTypeMismatchException.cs
- SqlCommandBuilder.cs
- QilValidationVisitor.cs
- TableDesigner.cs
- WorkflowInlining.cs
- TableAdapterManagerGenerator.cs
- AtlasWeb.Designer.cs
- SqlCommandBuilder.cs
- HwndMouseInputProvider.cs
- CodeBlockBuilder.cs
- connectionpool.cs
- CodeDOMProvider.cs
- ResourceDisplayNameAttribute.cs
- Comparer.cs
- CacheSection.cs
- DataGridViewElement.cs
- QilXmlReader.cs
- CommonDialog.cs
- TypeInitializationException.cs
- BindingGroup.cs
- EventManager.cs
- OneOfScalarConst.cs
- EdmFunctionAttribute.cs
- SqlLiftWhereClauses.cs
- SafeNativeMethodsOther.cs
- ProtocolElement.cs
- NativeMethodsCLR.cs
- CodeThrowExceptionStatement.cs
- SystemMulticastIPAddressInformation.cs
- TrustLevelCollection.cs
- AuthenticatedStream.cs
- EventData.cs
- UInt64Storage.cs
- FixedNode.cs
- ConfigurationLoader.cs
- SafeEventLogWriteHandle.cs
- TokenBasedSetEnumerator.cs
- Label.cs
- DataPagerCommandEventArgs.cs
- x509utils.cs
- CodeDOMProvider.cs
- Int64KeyFrameCollection.cs
- Keywords.cs
- ApplicationSettingsBase.cs
- CategoryValueConverter.cs
- GridEntryCollection.cs
- DbSetClause.cs
- ProxyWebPart.cs
- TableLayoutPanelDesigner.cs
- MailMessage.cs
- AddingNewEventArgs.cs
- StrongNameMembershipCondition.cs
- M3DUtil.cs
- TiffBitmapDecoder.cs
- XslNumber.cs
- BrowsableAttribute.cs
- MimeMapping.cs
- StrokeFIndices.cs
- HealthMonitoringSectionHelper.cs
- storepermission.cs
- CommentEmitter.cs
- SoapFault.cs
- DataGridViewRowHeaderCell.cs
- QueryContinueDragEvent.cs
- RuntimeHandles.cs
- HtmlShim.cs
- OutputCacheSettingsSection.cs
- BufferedGenericXmlSecurityToken.cs
- NavigationCommands.cs
- QilExpression.cs
- ListViewItem.cs
- SettingsAttributes.cs
- BooleanFunctions.cs
- FlowDocumentPageViewerAutomationPeer.cs
- PropertyGridView.cs
- Style.cs
- MarkupObject.cs
- XamlClipboardData.cs
- DbQueryCommandTree.cs