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
- SafePEFileHandle.cs
- RootBuilder.cs
- StackBuilderSink.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- RelationshipConstraintValidator.cs
- ScrollProperties.cs
- TextTreeObjectNode.cs
- MonthCalendar.cs
- XmlSerializerVersionAttribute.cs
- ItemCollectionEditor.cs
- XamlReaderConstants.cs
- CountdownEvent.cs
- smtpconnection.cs
- BooleanSwitch.cs
- SByte.cs
- ThreadInterruptedException.cs
- HashStream.cs
- XmlCountingReader.cs
- ByeMessageCD1.cs
- StyleSheetRefUrlEditor.cs
- TextParagraphProperties.cs
- LinkLabel.cs
- ImageListDesigner.cs
- FontStretch.cs
- RowVisual.cs
- CacheAxisQuery.cs
- HiddenField.cs
- ActivityMarkupSerializationProvider.cs
- BinHexEncoding.cs
- TypeElement.cs
- UpdateTranslator.cs
- FrameSecurityDescriptor.cs
- ProfileModule.cs
- XmlDictionaryWriter.cs
- AssemblyResolver.cs
- ObjectHandle.cs
- TextOutput.cs
- PeerObject.cs
- ConvertEvent.cs
- NetStream.cs
- PathHelper.cs
- ContractInferenceHelper.cs
- KeyedQueue.cs
- ObservableDictionary.cs
- AssemblyInfo.cs
- DataGridViewLayoutData.cs
- AuthenticationConfig.cs
- COM2Enum.cs
- AssemblyInfo.cs
- XmlSchemaSimpleTypeUnion.cs
- CustomError.cs
- ToolStripDropDownButton.cs
- WMIGenerator.cs
- ContainerControl.cs
- NaturalLanguageHyphenator.cs
- objectresult_tresulttype.cs
- AlignmentXValidation.cs
- SystemKeyConverter.cs
- KeyGestureConverter.cs
- ListControlDesigner.cs
- XmlSchemaChoice.cs
- SeekableReadStream.cs
- SmtpFailedRecipientsException.cs
- OleDbInfoMessageEvent.cs
- PageThemeParser.cs
- DbDeleteCommandTree.cs
- ControlUtil.cs
- VisualState.cs
- NativeMethods.cs
- TextAnchor.cs
- HyperLinkStyle.cs
- CodeGenerator.cs
- TraceListeners.cs
- ListItemCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- oledbconnectionstring.cs
- MarkupCompilePass2.cs
- NotImplementedException.cs
- ContentControl.cs
- WebServiceTypeData.cs
- ActivityTrace.cs
- SystemEvents.cs
- PolicyUnit.cs
- ExplicitDiscriminatorMap.cs
- ControlAdapter.cs
- XmlSchemaSearchPattern.cs
- XmlWriterTraceListener.cs
- SmiEventSink_DeferedProcessing.cs
- ResXResourceWriter.cs
- WebEvents.cs
- StringReader.cs
- FocusTracker.cs
- SmiRequestExecutor.cs
- MsmqOutputChannel.cs
- PartialCachingAttribute.cs
- AssemblyCollection.cs
- ControlBindingsConverter.cs
- nulltextnavigator.cs
- ByteRangeDownloader.cs
- FormViewInsertEventArgs.cs