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
- ServiceOperationUIEditor.cs
- UnionCodeGroup.cs
- Regex.cs
- XMLSyntaxException.cs
- MessageProtectionOrder.cs
- OdbcDataAdapter.cs
- FileVersion.cs
- XmlSerializableReader.cs
- QilInvoke.cs
- MethodSignatureGenerator.cs
- Point4D.cs
- EmitterCache.cs
- TcpTransportSecurityElement.cs
- AssemblyResourceLoader.cs
- SqlFileStream.cs
- TabItemAutomationPeer.cs
- PropertyPathWorker.cs
- ComAwareEventInfo.cs
- Collection.cs
- Models.cs
- DeviceSpecificDialogCachedState.cs
- WindowsAuthenticationEventArgs.cs
- DistributedTransactionPermission.cs
- PipelineModuleStepContainer.cs
- PrintEvent.cs
- WebService.cs
- BufferModesCollection.cs
- HealthMonitoringSection.cs
- Helpers.cs
- MachineKeySection.cs
- HtmlShim.cs
- Geometry.cs
- RegistryDataKey.cs
- safelink.cs
- WindowsProgressbar.cs
- ToolBarPanel.cs
- dbdatarecord.cs
- EventBuilder.cs
- WindowInteropHelper.cs
- TextClipboardData.cs
- CaseExpr.cs
- ServerIdentity.cs
- PerfCounterSection.cs
- NavigateEvent.cs
- ProcessThreadCollection.cs
- ValueHandle.cs
- ThreadPool.cs
- PartDesigner.cs
- MetadataCollection.cs
- SqlDataSourceView.cs
- MimeParameter.cs
- LocationSectionRecord.cs
- Sql8ConformanceChecker.cs
- DispatcherExceptionFilterEventArgs.cs
- ComboBox.cs
- DataTemplateKey.cs
- SimpleTypeResolver.cs
- Comparer.cs
- VerticalAlignConverter.cs
- TextBoxAutoCompleteSourceConverter.cs
- UpdateCommand.cs
- DiagnosticsConfigurationHandler.cs
- ThemeDirectoryCompiler.cs
- DataListItemCollection.cs
- DefaultMemberAttribute.cs
- HexParser.cs
- EnumBuilder.cs
- DataSourceSelectArguments.cs
- DataBoundControlHelper.cs
- EventLogPermissionHolder.cs
- SamlAdvice.cs
- _TransmitFileOverlappedAsyncResult.cs
- PropertyInformation.cs
- ProfileParameter.cs
- InputLanguageProfileNotifySink.cs
- XmlCharType.cs
- DefaultPropertyAttribute.cs
- XPathPatternBuilder.cs
- DiscoveryMessageSequenceCD1.cs
- Path.cs
- BCLDebug.cs
- DSASignatureDeformatter.cs
- SafeLocalAllocation.cs
- Assert.cs
- XmlCharType.cs
- SerializationHelper.cs
- IsolatedStorageException.cs
- Errors.cs
- EdgeModeValidation.cs
- SqlClientWrapperSmiStreamChars.cs
- InkCanvas.cs
- UpdateTranslator.cs
- SerializationException.cs
- UidManager.cs
- Transform.cs
- GridLength.cs
- cookiecontainer.cs
- odbcmetadatacollectionnames.cs
- ObjectStateFormatter.cs
- ComponentEditorForm.cs