Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementElementCollection.cs / 1305376 / ConnectionManagementElementCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Security.Permissions; [ConfigurationCollection(typeof(ConnectionManagementElement))] public sealed class ConnectionManagementElementCollection : ConfigurationElementCollection { public ConnectionManagementElementCollection() { } public ConnectionManagementElement this[int index] { get { return (ConnectionManagementElement)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index,value); } } public new ConnectionManagementElement this[string name] { get { return (ConnectionManagementElement)BaseGet(name); } set { if (BaseGet(name) != null) { BaseRemove(name); } BaseAdd(value); } } public void Add(ConnectionManagementElement element) { BaseAdd(element); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new ConnectionManagementElement(); } protected override Object GetElementKey(ConfigurationElement element) { if (element == null) throw new ArgumentNullException("element"); return ((ConnectionManagementElement)element).Key; } public int IndexOf(ConnectionManagementElement element) { return BaseIndexOf(element); } public void Remove(ConnectionManagementElement element) { if (element == null) throw new ArgumentNullException("element"); BaseRemove(element.Key); } public void Remove(string name) { BaseRemove(name); } public void RemoveAt(int index) { BaseRemoveAt(index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Security.Permissions; [ConfigurationCollection(typeof(ConnectionManagementElement))] public sealed class ConnectionManagementElementCollection : ConfigurationElementCollection { public ConnectionManagementElementCollection() { } public ConnectionManagementElement this[int index] { get { return (ConnectionManagementElement)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index,value); } } public new ConnectionManagementElement this[string name] { get { return (ConnectionManagementElement)BaseGet(name); } set { if (BaseGet(name) != null) { BaseRemove(name); } BaseAdd(value); } } public void Add(ConnectionManagementElement element) { BaseAdd(element); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new ConnectionManagementElement(); } protected override Object GetElementKey(ConfigurationElement element) { if (element == null) throw new ArgumentNullException("element"); return ((ConnectionManagementElement)element).Key; } public int IndexOf(ConnectionManagementElement element) { return BaseIndexOf(element); } public void Remove(ConnectionManagementElement element) { if (element == null) throw new ArgumentNullException("element"); BaseRemove(element.Key); } public void Remove(string name) { BaseRemove(name); } public void RemoveAt(int index) { BaseRemoveAt(index); } } } // 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
- CqlQuery.cs
- VisualStateChangedEventArgs.cs
- HwndMouseInputProvider.cs
- UpdatePanelTrigger.cs
- SupportsEventValidationAttribute.cs
- WindowsRichEditRange.cs
- CharacterBuffer.cs
- controlskin.cs
- StructureChangedEventArgs.cs
- UInt16Converter.cs
- unsafenativemethodstextservices.cs
- OleDbPermission.cs
- XamlClipboardData.cs
- EntityDataSource.cs
- ClientSideProviderDescription.cs
- CharEnumerator.cs
- TreeChangeInfo.cs
- GeneralTransform2DTo3DTo2D.cs
- UriTemplateTable.cs
- TypeConverterHelper.cs
- WindowsRichEditRange.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- RulePatternOps.cs
- _SafeNetHandles.cs
- WebPartDisplayMode.cs
- BindingExpressionBase.cs
- PropertyInformation.cs
- Pair.cs
- KeyboardDevice.cs
- MailAddressCollection.cs
- TextEmbeddedObject.cs
- XPathMultyIterator.cs
- ReferenceEqualityComparer.cs
- XsdSchemaFileEditor.cs
- BaseValidator.cs
- CodeDomConfigurationHandler.cs
- DataListItem.cs
- RenderCapability.cs
- WindowsImpersonationContext.cs
- DescendentsWalkerBase.cs
- ObjectQueryExecutionPlan.cs
- CounterCreationData.cs
- Pair.cs
- FrameworkElementFactoryMarkupObject.cs
- DataGridViewCellValidatingEventArgs.cs
- AsyncDataRequest.cs
- BindingListCollectionView.cs
- XmlQualifiedNameTest.cs
- AnimationStorage.cs
- DbMetaDataFactory.cs
- Assembly.cs
- SHA512.cs
- CharConverter.cs
- ErrorWrapper.cs
- HashCodeCombiner.cs
- WebPartHeaderCloseVerb.cs
- DataSourceControlBuilder.cs
- TiffBitmapEncoder.cs
- TriState.cs
- XmlWrappingReader.cs
- Help.cs
- BindingBase.cs
- SelectedDatesCollection.cs
- TypeDelegator.cs
- Vector.cs
- DataControlFieldHeaderCell.cs
- IMembershipProvider.cs
- ConfigurationValidatorBase.cs
- HttpRequestCacheValidator.cs
- AttachInfo.cs
- PackageStore.cs
- InheritanceContextChangedEventManager.cs
- SamlAudienceRestrictionCondition.cs
- GroupJoinQueryOperator.cs
- InternalControlCollection.cs
- NonBatchDirectoryCompiler.cs
- Profiler.cs
- XmlAnyElementAttributes.cs
- OletxDependentTransaction.cs
- RowBinding.cs
- Utils.cs
- DataObjectCopyingEventArgs.cs
- DataRelation.cs
- dataprotectionpermissionattribute.cs
- IList.cs
- EventLog.cs
- HeaderPanel.cs
- SchemaAttDef.cs
- VersionValidator.cs
- StreamingContext.cs
- ProtocolException.cs
- ApplicationFileCodeDomTreeGenerator.cs
- NegotiateStream.cs
- DocumentPage.cs
- GZipDecoder.cs
- DataRecordObjectView.cs
- StaticExtensionConverter.cs
- CommandCollectionEditor.cs
- SoapExtension.cs
- StyleXamlParser.cs