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
- RectangleGeometry.cs
- AdjustableArrowCap.cs
- XmlAttributeAttribute.cs
- ProgressChangedEventArgs.cs
- CachingParameterInspector.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- MenuEventArgs.cs
- Accessible.cs
- OleStrCAMarshaler.cs
- SctClaimDictionary.cs
- FixedSOMPage.cs
- ProviderSettings.cs
- HttpProcessUtility.cs
- MetadataUtil.cs
- DerivedKeySecurityToken.cs
- ControlHelper.cs
- MimeTextImporter.cs
- CriticalExceptions.cs
- PocoEntityKeyStrategy.cs
- DocumentCollection.cs
- BufferedStream.cs
- HostedImpersonationContext.cs
- ChannelDemuxer.cs
- SafeSecurityHandles.cs
- _Semaphore.cs
- TcpAppDomainProtocolHandler.cs
- HttpRequestBase.cs
- SystemResourceHost.cs
- BamlLocalizationDictionary.cs
- DataGridPreparingCellForEditEventArgs.cs
- PublisherIdentityPermission.cs
- StaticExtensionConverter.cs
- Bezier.cs
- Types.cs
- DataRow.cs
- ItemPager.cs
- CommandCollectionEditor.cs
- ReferenceSchema.cs
- ComPersistableTypeElement.cs
- categoryentry.cs
- GroupBox.cs
- Zone.cs
- printdlgexmarshaler.cs
- SpeechEvent.cs
- Encoder.cs
- IdnMapping.cs
- TransformedBitmap.cs
- cryptoapiTransform.cs
- LayoutDump.cs
- AsymmetricSignatureDeformatter.cs
- ManagedIStream.cs
- WebResourceAttribute.cs
- MediaCommands.cs
- COAUTHINFO.cs
- SmtpCommands.cs
- OutOfProcStateClientManager.cs
- Activator.cs
- OdbcDataAdapter.cs
- FormParameter.cs
- BinHexEncoder.cs
- ServiceModelEnumValidator.cs
- AttachInfo.cs
- ResourceReferenceExpression.cs
- EntryPointNotFoundException.cs
- CroppedBitmap.cs
- InternalsVisibleToAttribute.cs
- ContentValidator.cs
- SafeCancelMibChangeNotify.cs
- Soap.cs
- ItemsControl.cs
- FormClosedEvent.cs
- CustomErrorCollection.cs
- DbUpdateCommandTree.cs
- SHA384Managed.cs
- XamlHostingConfiguration.cs
- PackageFilter.cs
- CurrentTimeZone.cs
- EntityClassGenerator.cs
- NamespaceInfo.cs
- RenderDataDrawingContext.cs
- ClientSponsor.cs
- TCPListener.cs
- BodyWriter.cs
- ToolStripItemEventArgs.cs
- AvTraceFormat.cs
- XmlMtomWriter.cs
- NameValueCache.cs
- XmlIlGenerator.cs
- Error.cs
- ScrollData.cs
- NamedElement.cs
- FileUtil.cs
- ManagedIStream.cs
- FileRecordSequence.cs
- SequenceRangeCollection.cs
- CompilationSection.cs
- SpellCheck.cs
- FlowDocument.cs
- ScriptManagerProxy.cs
- CharEntityEncoderFallback.cs