Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputProviderSite.cs
- Lasso.cs
- RightsManagementErrorHandler.cs
- UpDownEvent.cs
- DesignerAttributeInfo.cs
- FactoryRecord.cs
- Debugger.cs
- DtdParser.cs
- ThicknessAnimationUsingKeyFrames.cs
- Console.cs
- SinglePageViewer.cs
- PageSettings.cs
- PropertyMappingExceptionEventArgs.cs
- ImageSource.cs
- FixedSOMFixedBlock.cs
- ResourceSet.cs
- TableProviderWrapper.cs
- _LocalDataStoreMgr.cs
- GraphicsState.cs
- HttpDebugHandler.cs
- BaseTemplateBuildProvider.cs
- ClientCultureInfo.cs
- NameGenerator.cs
- XamlFilter.cs
- ExtensionQuery.cs
- ConfigurationElement.cs
- InstanceData.cs
- ObjectDataSource.cs
- EntityContainer.cs
- GeometryModel3D.cs
- SqlMethodTransformer.cs
- HttpListenerRequestUriBuilder.cs
- LocalizedNameDescriptionPair.cs
- BigInt.cs
- ActivityTypeCodeDomSerializer.cs
- mactripleDES.cs
- BindToObject.cs
- AnnotationComponentChooser.cs
- AudioFormatConverter.cs
- CounterCreationData.cs
- OneOfTypeConst.cs
- RSAProtectedConfigurationProvider.cs
- CellPartitioner.cs
- ByteStreamGeometryContext.cs
- CanonicalFontFamilyReference.cs
- HMACSHA256.cs
- CodeIdentifier.cs
- HiddenField.cs
- Cursors.cs
- GregorianCalendarHelper.cs
- ComboBox.cs
- MouseEventArgs.cs
- Directory.cs
- Image.cs
- StopStoryboard.cs
- GetChildSubtree.cs
- HttpCapabilitiesSectionHandler.cs
- HtmlInputReset.cs
- DetailsViewRowCollection.cs
- QueryContext.cs
- Point4D.cs
- GridViewRowPresenterBase.cs
- WindowsContainer.cs
- ButtonChrome.cs
- GeneralTransform2DTo3DTo2D.cs
- XamlTypeMapper.cs
- DoubleCollection.cs
- SettingsPropertyWrongTypeException.cs
- XmlSchemas.cs
- PartBasedPackageProperties.cs
- GACMembershipCondition.cs
- validation.cs
- DynamicDataRoute.cs
- XmlUrlResolver.cs
- InkCanvasSelectionAdorner.cs
- FontFamilyConverter.cs
- StateManagedCollection.cs
- DispatchChannelSink.cs
- ApplicationBuildProvider.cs
- ProtocolViolationException.cs
- CryptoProvider.cs
- ImageKeyConverter.cs
- ErrorRuntimeConfig.cs
- RegionData.cs
- unsafenativemethodstextservices.cs
- SqlWorkflowPersistenceService.cs
- DataGridAddNewRow.cs
- FreezableDefaultValueFactory.cs
- SynchronizedPool.cs
- FactoryGenerator.cs
- UmAlQuraCalendar.cs
- XhtmlBasicValidatorAdapter.cs
- ActivityInterfaces.cs
- xmlfixedPageInfo.cs
- ProcessManager.cs
- NetMsmqBindingCollectionElement.cs
- PageRequestManager.cs
- PropertyDescriptorCollection.cs
- InputLangChangeEvent.cs
- ProtocolsConfigurationHandler.cs