Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Header.cs
- HtmlTableRowCollection.cs
- SettingsContext.cs
- SessionPageStatePersister.cs
- XmlSequenceWriter.cs
- WebEvents.cs
- ProviderConnectionPoint.cs
- DataGridCell.cs
- _NetworkingPerfCounters.cs
- DataSourceHelper.cs
- TrackBarDesigner.cs
- HexParser.cs
- XmlSchema.cs
- PassportIdentity.cs
- InlineObject.cs
- NameScopePropertyAttribute.cs
- ReadOnlyCollectionBase.cs
- BitHelper.cs
- IdentifierCollection.cs
- PackageDigitalSignature.cs
- Size.cs
- DataTableCollection.cs
- XPathEmptyIterator.cs
- BeginStoryboard.cs
- RadioButtonStandardAdapter.cs
- DataReceivedEventArgs.cs
- MyContact.cs
- AssemblyContextControlItem.cs
- DesignTableCollection.cs
- SimplePropertyEntry.cs
- DropDownList.cs
- XmlSchemaComplexContentRestriction.cs
- SectionVisual.cs
- ToolboxItemFilterAttribute.cs
- ConversionContext.cs
- Misc.cs
- FileEnumerator.cs
- EventsTab.cs
- StatusBarDrawItemEvent.cs
- SecurityPolicyVersion.cs
- MulticastDelegate.cs
- SpecularMaterial.cs
- TemplateInstanceAttribute.cs
- DirectoryNotFoundException.cs
- _NestedMultipleAsyncResult.cs
- TraceXPathNavigator.cs
- ApplyTemplatesAction.cs
- RuleSettings.cs
- DataGridViewCellValidatingEventArgs.cs
- NamespaceList.cs
- SubMenuStyleCollectionEditor.cs
- ConstructorNeedsTagAttribute.cs
- MenuBase.cs
- MarkedHighlightComponent.cs
- Privilege.cs
- BufferModeSettings.cs
- TypeUtil.cs
- ListItem.cs
- StringTraceRecord.cs
- Registry.cs
- FunctionDetailsReader.cs
- RectangleHotSpot.cs
- LocalValueEnumerator.cs
- FileSystemInfo.cs
- SubMenuStyleCollection.cs
- BStrWrapper.cs
- BitmapEffectDrawing.cs
- NumberSubstitution.cs
- RegexRunnerFactory.cs
- VirtualDirectoryMappingCollection.cs
- DataColumnPropertyDescriptor.cs
- TextBounds.cs
- HandledMouseEvent.cs
- ListViewItemMouseHoverEvent.cs
- JsonFormatGeneratorStatics.cs
- OdbcCommandBuilder.cs
- Tuple.cs
- HashSet.cs
- DesignerSerializerAttribute.cs
- WebMessageEncodingElement.cs
- DeviceFilterEditorDialog.cs
- OleDbRowUpdatingEvent.cs
- PanelStyle.cs
- XamlTreeBuilder.cs
- DebugTrace.cs
- TrustManager.cs
- EventToken.cs
- SamlAudienceRestrictionCondition.cs
- SqlCacheDependencySection.cs
- SqlOuterApplyReducer.cs
- CommandExpr.cs
- UInt64Converter.cs
- ViewKeyConstraint.cs
- LinearGradientBrush.cs
- securitycriticaldataformultiplegetandset.cs
- SessionState.cs
- TransactionFlowProperty.cs
- XmlSerializerVersionAttribute.cs
- PackageStore.cs
- UpdateTracker.cs