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
- XmlDataSource.cs
- SqlLiftIndependentRowExpressions.cs
- ConnectionPointCookie.cs
- PlatformNotSupportedException.cs
- SchemaInfo.cs
- SymLanguageType.cs
- SiblingIterators.cs
- TitleStyle.cs
- CodeParameterDeclarationExpression.cs
- PropertyEntry.cs
- MemoryMappedFileSecurity.cs
- HtmlUtf8RawTextWriter.cs
- XmlSerializerSection.cs
- WaitHandleCannotBeOpenedException.cs
- IPipelineRuntime.cs
- ExpressionNormalizer.cs
- ComboBox.cs
- ExecutedRoutedEventArgs.cs
- EmptyEnumerator.cs
- _BaseOverlappedAsyncResult.cs
- JpegBitmapDecoder.cs
- HwndStylusInputProvider.cs
- UserControlParser.cs
- ElementProxy.cs
- DataGridHeaderBorder.cs
- SchemaDeclBase.cs
- PointHitTestResult.cs
- ConfigurationSettings.cs
- NativeMethods.cs
- MLangCodePageEncoding.cs
- XmlComment.cs
- Exceptions.cs
- XmlAttribute.cs
- PocoPropertyAccessorStrategy.cs
- XmlAtomicValue.cs
- ParenthesizePropertyNameAttribute.cs
- DataBoundControl.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RuleSet.cs
- ComUdtElement.cs
- WebCategoryAttribute.cs
- oledbconnectionstring.cs
- InvalidComObjectException.cs
- SizeKeyFrameCollection.cs
- Logging.cs
- ZoneIdentityPermission.cs
- CategoryValueConverter.cs
- CompositeCollectionView.cs
- TraceInternal.cs
- DynamicValueConverter.cs
- TriggerAction.cs
- WebBrowserUriTypeConverter.cs
- Queue.cs
- _SafeNetHandles.cs
- WebBrowsableAttribute.cs
- DataObjectSettingDataEventArgs.cs
- FlowLayout.cs
- EditingMode.cs
- ResourceContainer.cs
- EntitySetRetriever.cs
- WindowsTreeView.cs
- Pair.cs
- DataTableReader.cs
- FormViewInsertEventArgs.cs
- DataGridViewTopRowAccessibleObject.cs
- Base64Decoder.cs
- ComboBox.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- EventLogPermissionEntry.cs
- CustomTypeDescriptor.cs
- _LocalDataStore.cs
- MissingMemberException.cs
- MachineSettingsSection.cs
- _SpnDictionary.cs
- FormViewInsertedEventArgs.cs
- codemethodreferenceexpression.cs
- KeyToListMap.cs
- ScrollEvent.cs
- TraceListener.cs
- COAUTHIDENTITY.cs
- TextElement.cs
- PreProcessor.cs
- ExpandCollapseProviderWrapper.cs
- AspCompat.cs
- PageCatalogPart.cs
- DocumentGridContextMenu.cs
- ServiceObjectContainer.cs
- MetadataSource.cs
- DbConnectionStringBuilder.cs
- MemberAccessException.cs
- CodeMemberField.cs
- TextServicesDisplayAttribute.cs
- XComponentModel.cs
- TouchesCapturedWithinProperty.cs
- MetadataArtifactLoaderCompositeResource.cs
- AsmxEndpointPickerExtension.cs
- AddInBase.cs
- TdsParserHelperClasses.cs
- HostedBindingBehavior.cs
- PathNode.cs