Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ControlEvent.cs
- GeneralTransform2DTo3D.cs
- DelayedRegex.cs
- GiveFeedbackEventArgs.cs
- PerformanceCounterPermissionEntry.cs
- DataGridState.cs
- SafeHandle.cs
- PolicyStatement.cs
- RolePrincipal.cs
- FactoryGenerator.cs
- DependencyObjectProvider.cs
- CodeDirectiveCollection.cs
- GPPOINTF.cs
- WindowsRichEditRange.cs
- OdbcConnectionString.cs
- TouchesOverProperty.cs
- recordstatefactory.cs
- WindowsContainer.cs
- SingleQueryOperator.cs
- SmiGettersStream.cs
- _NestedMultipleAsyncResult.cs
- DataGridViewCellFormattingEventArgs.cs
- DbMetaDataColumnNames.cs
- GridItem.cs
- WorkflowClientDeliverMessageWrapper.cs
- MessagePartDescriptionCollection.cs
- Condition.cs
- StronglyTypedResourceBuilder.cs
- StrongNameMembershipCondition.cs
- RectangleHotSpot.cs
- StyleSheetComponentEditor.cs
- ScaleTransform.cs
- InheritedPropertyChangedEventArgs.cs
- CodeAttributeArgument.cs
- Message.cs
- StrongNameIdentityPermission.cs
- GifBitmapEncoder.cs
- PingReply.cs
- ArrayWithOffset.cs
- TrackingMemoryStreamFactory.cs
- TypePresenter.xaml.cs
- ProcessRequestArgs.cs
- AQNBuilder.cs
- MemberDescriptor.cs
- UseAttributeSetsAction.cs
- SchemaConstraints.cs
- CorrelationTokenTypeConvertor.cs
- StringBuilder.cs
- GeneralTransform3D.cs
- BufferModesCollection.cs
- BehaviorService.cs
- PKCS1MaskGenerationMethod.cs
- ResourceType.cs
- MailDefinition.cs
- DataGridItemEventArgs.cs
- LinkLabel.cs
- CheckBoxBaseAdapter.cs
- KeySpline.cs
- dbenumerator.cs
- SchemaTableColumn.cs
- FaultDesigner.cs
- TypeNameParser.cs
- SerializationFieldInfo.cs
- DataGridItemCollection.cs
- ObjectConverter.cs
- DrawingGroupDrawingContext.cs
- PropertyDescriptorCollection.cs
- BigInt.cs
- SqlProviderManifest.cs
- StandardBindingImporter.cs
- Literal.cs
- SQLBytesStorage.cs
- FileUtil.cs
- TextBoxBase.cs
- TextEvent.cs
- Command.cs
- StatusBarAutomationPeer.cs
- ELinqQueryState.cs
- StrokeRenderer.cs
- HttpBrowserCapabilitiesBase.cs
- TableLayoutPanel.cs
- DomNameTable.cs
- DocumentXmlWriter.cs
- oledbmetadatacollectionnames.cs
- BooleanSwitch.cs
- Update.cs
- CollectionsUtil.cs
- CellParagraph.cs
- ProcessModelInfo.cs
- WebHttpSecurity.cs
- DWriteFactory.cs
- UserNameSecurityToken.cs
- SecurityContextSecurityTokenAuthenticator.cs
- DataObjectCopyingEventArgs.cs
- HttpListenerTimeoutManager.cs
- FormClosedEvent.cs
- Splitter.cs
- EventLogPermissionEntryCollection.cs
- Configuration.cs
- _SecureChannel.cs