Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementElementCollection.cs / 1 / 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
- MaterialGroup.cs
- DataGridViewHeaderCell.cs
- DocumentsTrace.cs
- XmlCompatibilityReader.cs
- IndexOutOfRangeException.cs
- DiscoveryProxy.cs
- SoapEnumAttribute.cs
- WCFServiceClientProxyGenerator.cs
- DiscoveryClientChannelFactory.cs
- ConstantProjectedSlot.cs
- XmlSerializationReader.cs
- ReverseComparer.cs
- MimeTextImporter.cs
- StackSpiller.cs
- EventTrigger.cs
- MonthCalendar.cs
- WindowsIdentity.cs
- SapiInterop.cs
- SafeLocalAllocation.cs
- TypeHelper.cs
- BigInt.cs
- AuthenticationService.cs
- GridViewUpdatedEventArgs.cs
- CultureNotFoundException.cs
- Icon.cs
- WindowsTitleBar.cs
- ContentHostHelper.cs
- MasterPageParser.cs
- ApplicationTrust.cs
- DataGridCheckBoxColumn.cs
- EditableTreeList.cs
- TraceContextRecord.cs
- DocumentViewerBaseAutomationPeer.cs
- UpdateExpressionVisitor.cs
- _LocalDataStore.cs
- ReflectionTypeLoadException.cs
- ObjectHandle.cs
- EncryptRequest.cs
- CompoundFileReference.cs
- CompilerGlobalScopeAttribute.cs
- XmlDesigner.cs
- PerformanceCounterLib.cs
- RegexInterpreter.cs
- DllHostedComPlusServiceHost.cs
- UIElement3D.cs
- QueryableDataSourceView.cs
- invalidudtexception.cs
- XmlAnyElementAttribute.cs
- DiscreteKeyFrames.cs
- HttpPostedFile.cs
- HttpHostedTransportConfiguration.cs
- SecurityContext.cs
- SmiEventSink.cs
- LayoutTable.cs
- ExpressionBuilder.cs
- DateTimeConverter2.cs
- TargetParameterCountException.cs
- SelectionRange.cs
- LightweightCodeGenerator.cs
- MenuItem.cs
- TableCellAutomationPeer.cs
- RegexWorker.cs
- ConnectionsZone.cs
- ExecutionEngineException.cs
- SerializationHelper.cs
- ProfileGroupSettings.cs
- ResourcesGenerator.cs
- GeneralEndpointIdentity.cs
- SelectionPattern.cs
- BCLDebug.cs
- WindowsSecurityToken.cs
- PropertyToken.cs
- PlainXmlSerializer.cs
- Invariant.cs
- Opcode.cs
- PreloadedPackages.cs
- OdbcConnectionPoolProviderInfo.cs
- DataKeyCollection.cs
- Accessors.cs
- Pair.cs
- TabRenderer.cs
- XPathAncestorIterator.cs
- PrimitiveSchema.cs
- DocumentGridPage.cs
- HeaderUtility.cs
- Rect3D.cs
- HtmlUtf8RawTextWriter.cs
- FixedSOMContainer.cs
- EventWaitHandle.cs
- SR.cs
- AutomationEvent.cs
- DetailsView.cs
- XmlAttribute.cs
- PtsContext.cs
- LineGeometry.cs
- DataGridViewAutoSizeModeEventArgs.cs
- RootNamespaceAttribute.cs
- Identifier.cs
- UIPermission.cs
- DecoderFallbackWithFailureFlag.cs