Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- PointCollectionValueSerializer.cs
- ThaiBuddhistCalendar.cs
- _NtlmClient.cs
- PopupEventArgs.cs
- RootCodeDomSerializer.cs
- XmlAttributeOverrides.cs
- ValidationResult.cs
- XmlUtf8RawTextWriter.cs
- QueryGeneratorBase.cs
- HttpModuleAction.cs
- Vector3DKeyFrameCollection.cs
- ThreadExceptionDialog.cs
- FromRequest.cs
- ViewManagerAttribute.cs
- MethodBuilder.cs
- HttpRequestCacheValidator.cs
- ManagementNamedValueCollection.cs
- InvalidOleVariantTypeException.cs
- DataPointer.cs
- RepeaterItemEventArgs.cs
- ConvertersCollection.cs
- DataGridItemCollection.cs
- StreamSecurityUpgradeInitiator.cs
- RegexInterpreter.cs
- SynchronizedDispatch.cs
- ConstraintCollection.cs
- __TransparentProxy.cs
- OdbcInfoMessageEvent.cs
- RSAPKCS1SignatureFormatter.cs
- ConfigurationConverterBase.cs
- PhonemeEventArgs.cs
- StructuredTypeEmitter.cs
- DeferredReference.cs
- HashMembershipCondition.cs
- HashStream.cs
- TableLayoutStyleCollection.cs
- XPathNodeInfoAtom.cs
- SimpleMailWebEventProvider.cs
- ModelPerspective.cs
- BitmapEffectInput.cs
- UserControlParser.cs
- NameValueCollection.cs
- LineMetrics.cs
- Number.cs
- SmtpNtlmAuthenticationModule.cs
- SerializerProvider.cs
- PaintValueEventArgs.cs
- Image.cs
- DbConnectionStringCommon.cs
- XPathParser.cs
- StatusBarPanel.cs
- RelatedCurrencyManager.cs
- ListBoxItem.cs
- StringBuilder.cs
- XmlSignatureProperties.cs
- GeometryGroup.cs
- ItemCollection.cs
- UriParserTemplates.cs
- ReturnValue.cs
- JumpPath.cs
- FixedFlowMap.cs
- ColorContextHelper.cs
- DeploymentExceptionMapper.cs
- RepeaterItem.cs
- PasswordPropertyTextAttribute.cs
- StatusBarDrawItemEvent.cs
- EventOpcode.cs
- IIS7UserPrincipal.cs
- LoginCancelEventArgs.cs
- WebDisplayNameAttribute.cs
- FrameworkContentElementAutomationPeer.cs
- ReversePositionQuery.cs
- AccessControlList.cs
- SqlDataSourceRefreshSchemaForm.cs
- TransformerInfo.cs
- UnionCodeGroup.cs
- MenuItem.cs
- StylusDevice.cs
- SectionRecord.cs
- ArrayExtension.cs
- XmlBinaryReaderSession.cs
- HttpProfileGroupBase.cs
- WebPartHelpVerb.cs
- PointUtil.cs
- ChangeInterceptorAttribute.cs
- WebPartsPersonalization.cs
- ArrangedElement.cs
- HttpContextBase.cs
- EditingCoordinator.cs
- DisposableCollectionWrapper.cs
- TriggerCollection.cs
- EntitySqlQueryState.cs
- MenuEventArgs.cs
- HashSet.cs
- CodeNamespace.cs
- Transaction.cs
- DesignerMetadata.cs
- PropertyReferenceExtension.cs
- DesignOnlyAttribute.cs
- StylusOverProperty.cs