Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- CheckBoxBaseAdapter.cs
- PointHitTestParameters.cs
- SqlDependency.cs
- ColorTransform.cs
- KeyEventArgs.cs
- IntPtr.cs
- CompletedAsyncResult.cs
- RoleService.cs
- CollectionEditVerbManager.cs
- IUnknownConstantAttribute.cs
- SurrogateChar.cs
- IPipelineRuntime.cs
- RootBrowserWindowAutomationPeer.cs
- PtsHelper.cs
- Vector.cs
- AffineTransform3D.cs
- SecurityException.cs
- ValueUnavailableException.cs
- ReachVisualSerializerAsync.cs
- TextElement.cs
- XsdCachingReader.cs
- NullExtension.cs
- ResumeStoryboard.cs
- ParenExpr.cs
- DependentList.cs
- SByteStorage.cs
- HierarchicalDataSourceConverter.cs
- dtdvalidator.cs
- ExpressionBinding.cs
- Button.cs
- Message.cs
- PerfCounters.cs
- EntityExpressionVisitor.cs
- RegisteredArrayDeclaration.cs
- Shared.cs
- InvariantComparer.cs
- SystemFonts.cs
- StickyNote.cs
- GridViewSelectEventArgs.cs
- DataGridViewTextBoxCell.cs
- Zone.cs
- XmlSchemaRedefine.cs
- ColorConvertedBitmapExtension.cs
- BitmapImage.cs
- XPathItem.cs
- DoubleCollectionConverter.cs
- DbConnectionFactory.cs
- HostedHttpTransportManager.cs
- UncommonField.cs
- SharedDp.cs
- ExtensibleClassFactory.cs
- SQLResource.cs
- ACE.cs
- DataSourceProvider.cs
- ExternalCalls.cs
- securestring.cs
- While.cs
- GregorianCalendarHelper.cs
- AspNetCompatibilityRequirementsAttribute.cs
- ProcessHostServerConfig.cs
- MD5.cs
- ChtmlImageAdapter.cs
- SoapFault.cs
- LockedActivityGlyph.cs
- FilterableAttribute.cs
- CorrelationResolver.cs
- LocalTransaction.cs
- MouseButton.cs
- AdornerLayer.cs
- PixelFormatConverter.cs
- CollectionExtensions.cs
- URLAttribute.cs
- UpnEndpointIdentityExtension.cs
- DragEventArgs.cs
- PageContentAsyncResult.cs
- DesignerAdapterUtil.cs
- _LocalDataStoreMgr.cs
- BuildProvider.cs
- Query.cs
- RawKeyboardInputReport.cs
- FixedSOMTable.cs
- AutomationAttributeInfo.cs
- SQLByteStorage.cs
- SingleQueryOperator.cs
- ToolStripComboBox.cs
- TraceContext.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ParseHttpDate.cs
- AuthenticationSchemesHelper.cs
- PermissionSetEnumerator.cs
- Literal.cs
- SQLDouble.cs
- TileBrush.cs
- ListViewDataItem.cs
- TransformedBitmap.cs
- DataServiceResponse.cs
- MenuItemStyle.cs
- SyntaxCheck.cs
- OleDbRowUpdatingEvent.cs
- VectorCollectionConverter.cs