Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SeparatorAutomationPeer.cs
- TrustLevel.cs
- TreeView.cs
- NodeLabelEditEvent.cs
- RelationshipConverter.cs
- SymmetricKeyWrap.cs
- BitmapEffectCollection.cs
- CodeValidator.cs
- ExtenderProvidedPropertyAttribute.cs
- MouseGestureValueSerializer.cs
- TemplatedAdorner.cs
- CachingHintValidation.cs
- XmlName.cs
- DesignerRegion.cs
- FontInfo.cs
- RestHandler.cs
- DispatcherSynchronizationContext.cs
- IgnoreFileBuildProvider.cs
- Convert.cs
- VirtualizingStackPanel.cs
- FlowchartDesignerCommands.cs
- _SingleItemRequestCache.cs
- ServicePointManagerElement.cs
- MobileControlsSection.cs
- ErrorWrapper.cs
- RangeValuePattern.cs
- TimerElapsedEvenArgs.cs
- UnsafeNativeMethods.cs
- ColorAnimationUsingKeyFrames.cs
- SqlDataSourceFilteringEventArgs.cs
- LogPolicy.cs
- MachineKey.cs
- BindingExpression.cs
- ContainerControlDesigner.cs
- WindowsScroll.cs
- DllHostInitializer.cs
- ChildrenQuery.cs
- RbTree.cs
- ForwardPositionQuery.cs
- CapacityStreamGeometryContext.cs
- ErrorProvider.cs
- MD5.cs
- DocumentViewerAutomationPeer.cs
- GAC.cs
- control.ime.cs
- LightweightEntityWrapper.cs
- WebBrowser.cs
- MimeTypeMapper.cs
- ChannelFactoryRefCache.cs
- PerformanceCounterLib.cs
- GetKeyedHashRequest.cs
- Material.cs
- RelationshipEndMember.cs
- DataGridViewCellConverter.cs
- SafeNativeMethods.cs
- OperationAbortedException.cs
- DesignerVerb.cs
- SelectManyQueryOperator.cs
- altserialization.cs
- QueryCursorEventArgs.cs
- TraceProvider.cs
- _NegoState.cs
- DataGridViewCellLinkedList.cs
- TemplateBindingExtension.cs
- StringBuilder.cs
- Evidence.cs
- InteropAutomationProvider.cs
- XmlSerializerFaultFormatter.cs
- XmlSchemaAny.cs
- ToolStripProgressBar.cs
- WindowsRichEdit.cs
- PersonalizationState.cs
- printdlgexmarshaler.cs
- RowVisual.cs
- DocumentsTrace.cs
- UnsignedPublishLicense.cs
- ConstraintEnumerator.cs
- XmlAttributeHolder.cs
- DurationConverter.cs
- WebPartAuthorizationEventArgs.cs
- SQLCharsStorage.cs
- DbMetaDataCollectionNames.cs
- TypedDataSourceCodeGenerator.cs
- DateTimeConstantAttribute.cs
- CssClassPropertyAttribute.cs
- XmlWellformedWriter.cs
- Double.cs
- RuntimeVariablesExpression.cs
- OrCondition.cs
- ToolStripDropDown.cs
- AddInProcess.cs
- AppDomain.cs
- OperationContextScope.cs
- UserControlDesigner.cs
- IApplicationTrustManager.cs
- TableColumn.cs
- MissingMemberException.cs
- GcSettings.cs
- AsyncPostBackErrorEventArgs.cs
- BoolExpr.cs