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
- FormatterServicesNoSerializableCheck.cs
- TextOnlyOutput.cs
- IDQuery.cs
- SignedPkcs7.cs
- XamlReaderHelper.cs
- CreateUserErrorEventArgs.cs
- XamlFrame.cs
- _RequestCacheProtocol.cs
- AnimationClock.cs
- FrameworkElementFactory.cs
- ToolStripOverflowButton.cs
- OleAutBinder.cs
- CombinedGeometry.cs
- DebugView.cs
- WebPartDesigner.cs
- DeploymentSection.cs
- CalendarKeyboardHelper.cs
- InputDevice.cs
- ThumbButtonInfoCollection.cs
- ProfileGroupSettingsCollection.cs
- GraphicsState.cs
- JournalEntry.cs
- AssertSection.cs
- SoapCodeExporter.cs
- TransformCryptoHandle.cs
- Slider.cs
- DependencyPropertyAttribute.cs
- FixUp.cs
- CommittableTransaction.cs
- PropertyConverter.cs
- PasswordDeriveBytes.cs
- CodeExporter.cs
- StringReader.cs
- CacheHelper.cs
- WebMessageEncoderFactory.cs
- TypeForwardedToAttribute.cs
- FormViewCommandEventArgs.cs
- Window.cs
- ITextView.cs
- DoubleIndependentAnimationStorage.cs
- SwitchElementsCollection.cs
- PersistChildrenAttribute.cs
- ReversePositionQuery.cs
- BinaryFormatterWriter.cs
- EventLogLink.cs
- CapabilitiesSection.cs
- ScriptControl.cs
- BigInt.cs
- StringBlob.cs
- controlskin.cs
- XpsFixedDocumentReaderWriter.cs
- PackageRelationship.cs
- DbBuffer.cs
- TemplateColumn.cs
- SmtpClient.cs
- PrtTicket_Base.cs
- xmlfixedPageInfo.cs
- SyndicationContent.cs
- TabletDeviceInfo.cs
- FunctionImportMapping.cs
- StringToken.cs
- BridgeDataRecord.cs
- CodeDomDesignerLoader.cs
- ImageButton.cs
- BamlWriter.cs
- CrossSiteScriptingValidation.cs
- EncodingDataItem.cs
- ToolStripItemRenderEventArgs.cs
- SafeNativeMethods.cs
- ToolStripGrip.cs
- ProviderSettings.cs
- OneOfScalarConst.cs
- SchemaObjectWriter.cs
- BookmarkScopeInfo.cs
- TileBrush.cs
- TimeSpanValidatorAttribute.cs
- EUCJPEncoding.cs
- RoleGroupCollection.cs
- IDictionary.cs
- HttpListener.cs
- SQLMoney.cs
- HashMembershipCondition.cs
- ToolStripDropDownClosedEventArgs.cs
- WindowsListView.cs
- MenuItemCollection.cs
- NativeMethods.cs
- SchemaNamespaceManager.cs
- ScrollProperties.cs
- SqlTypesSchemaImporter.cs
- ErrorInfoXmlDocument.cs
- DataRelationCollection.cs
- BaseDataBoundControl.cs
- MsmqTransportSecurity.cs
- DesignerAdapterAttribute.cs
- TemplatedAdorner.cs
- AVElementHelper.cs
- DelegateInArgument.cs
- MessagePropertyDescription.cs
- MsmqOutputSessionChannel.cs
- HttpDictionary.cs