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
- ParsedRoute.cs
- ExceptionUtil.cs
- SiteMembershipCondition.cs
- DesignRelationCollection.cs
- Header.cs
- FixUp.cs
- SRDisplayNameAttribute.cs
- HostVisual.cs
- CompilationUtil.cs
- XsdCachingReader.cs
- WebPartTransformerAttribute.cs
- SqlSelectStatement.cs
- PageRanges.cs
- DSASignatureDeformatter.cs
- BamlRecords.cs
- SecurityHeaderTokenResolver.cs
- JavaScriptString.cs
- DeviceContext.cs
- XPathItem.cs
- ObjectDesignerDataSourceView.cs
- COM2ComponentEditor.cs
- SecurityRuntime.cs
- NativeMethodsCLR.cs
- StorageComplexPropertyMapping.cs
- HtmlSelect.cs
- CustomErrorsSection.cs
- AssemblyResourceLoader.cs
- StrokeCollectionConverter.cs
- WinFormsComponentEditor.cs
- PrimitiveCodeDomSerializer.cs
- PersistChildrenAttribute.cs
- Pointer.cs
- TrackBarRenderer.cs
- BooleanAnimationUsingKeyFrames.cs
- FixedNode.cs
- Baml2006KnownTypes.cs
- SiteMapNodeItemEventArgs.cs
- Identity.cs
- TypedTableBase.cs
- AvTrace.cs
- SerializationInfoEnumerator.cs
- HttpModuleActionCollection.cs
- CodePropertyReferenceExpression.cs
- EntityException.cs
- UiaCoreApi.cs
- AtomServiceDocumentSerializer.cs
- BoundingRectTracker.cs
- NameNode.cs
- DesignerActionService.cs
- BuildTopDownAttribute.cs
- InstanceContextMode.cs
- MimeTypeMapper.cs
- BulletChrome.cs
- ExpressionPrefixAttribute.cs
- Keyboard.cs
- HttpPostProtocolImporter.cs
- Scene3D.cs
- HostSecurityManager.cs
- EventTask.cs
- IFlowDocumentViewer.cs
- AccessorTable.cs
- EventLogQuery.cs
- FloaterParaClient.cs
- securitycriticaldataformultiplegetandset.cs
- WmpBitmapEncoder.cs
- HTMLTextWriter.cs
- HitTestDrawingContextWalker.cs
- DllHostInitializer.cs
- SqlTriggerAttribute.cs
- ContentFilePart.cs
- SystemBrushes.cs
- TreeNodeCollection.cs
- EntityEntry.cs
- InlineCollection.cs
- PixelShader.cs
- ImageFormat.cs
- SizeAnimation.cs
- SystemTcpConnection.cs
- ReachIDocumentPaginatorSerializerAsync.cs
- SHA1.cs
- CharConverter.cs
- StrongNameIdentityPermission.cs
- RoleGroup.cs
- HwndProxyElementProvider.cs
- ApplicationId.cs
- DataMemberListEditor.cs
- XmlDictionaryReaderQuotas.cs
- AlphabeticalEnumConverter.cs
- DataGridViewTopLeftHeaderCell.cs
- BamlLocalizationDictionary.cs
- EpmSourcePathSegment.cs
- Attributes.cs
- EdgeModeValidation.cs
- TrustSection.cs
- DBBindings.cs
- DrawToolTipEventArgs.cs
- ClientScriptManagerWrapper.cs
- RangeValidator.cs
- HttpModuleAction.cs
- WindowsTitleBar.cs