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
- indexingfiltermarshaler.cs
- AppDomainResourcePerfCounters.cs
- OracleCommandSet.cs
- ToolZone.cs
- TrustSection.cs
- WizardForm.cs
- SmtpNtlmAuthenticationModule.cs
- DocumentCollection.cs
- TemplateBindingExtension.cs
- WebPartAddingEventArgs.cs
- FileSystemEnumerable.cs
- OutputCacheProfileCollection.cs
- CompilerGlobalScopeAttribute.cs
- CharacterBuffer.cs
- ICollection.cs
- ConnectionManagementElementCollection.cs
- TextBoxAutomationPeer.cs
- DataColumnChangeEvent.cs
- oledbmetadatacolumnnames.cs
- ValidationRuleCollection.cs
- FloatUtil.cs
- Parameter.cs
- ExplicitDiscriminatorMap.cs
- AlternationConverter.cs
- TriggerBase.cs
- columnmapfactory.cs
- TypeToStringValueConverter.cs
- CodeTypeMemberCollection.cs
- PolicyLevel.cs
- EraserBehavior.cs
- AssociatedControlConverter.cs
- PropertyCollection.cs
- CopyOnWriteList.cs
- CodeCatchClauseCollection.cs
- Int16Storage.cs
- CodeAttributeArgumentCollection.cs
- SecurityContextCookieSerializer.cs
- AccessibleObject.cs
- WebPartDesigner.cs
- DataGrid.cs
- WinFormsUtils.cs
- FontWeight.cs
- localization.cs
- BreakRecordTable.cs
- Timeline.cs
- DateTimeParse.cs
- TextElementEnumerator.cs
- ImportedNamespaceContextItem.cs
- InternalConfigRoot.cs
- DataTableCollection.cs
- SystemInfo.cs
- DesignerInterfaces.cs
- ModuleBuilder.cs
- FullTrustAssemblyCollection.cs
- InkCanvasInnerCanvas.cs
- VisualBasicSettings.cs
- SessionIDManager.cs
- InfoCardKeyedHashAlgorithm.cs
- RenderOptions.cs
- LookupNode.cs
- ConfigurationStrings.cs
- ApplicationServicesHostFactory.cs
- PageAsyncTask.cs
- ConnectionPool.cs
- Popup.cs
- OleDragDropHandler.cs
- FirstMatchCodeGroup.cs
- EdmType.cs
- TimeoutHelper.cs
- KeyGestureConverter.cs
- LastQueryOperator.cs
- InstanceNotReadyException.cs
- FastEncoder.cs
- TextDecoration.cs
- TextSegment.cs
- Path.cs
- InsufficientMemoryException.cs
- ProcessManager.cs
- XmlILConstructAnalyzer.cs
- DataGrid.cs
- DataTableReader.cs
- JsonFormatReaderGenerator.cs
- HiddenField.cs
- XamlFilter.cs
- VectorAnimationUsingKeyFrames.cs
- PersistencePipeline.cs
- StructuredType.cs
- GlyphRun.cs
- PrintEvent.cs
- DialogDivider.cs
- ConfigurationProperty.cs
- SessionPageStateSection.cs
- ColumnResizeUndoUnit.cs
- SectionXmlInfo.cs
- ApplicationInfo.cs
- EmbeddedObject.cs
- BaseValidator.cs
- FileDialog.cs
- ColorConvertedBitmapExtension.cs
- Soap.cs