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
- Control.cs
- SchemaInfo.cs
- IsolatedStoragePermission.cs
- XmlNamespaceDeclarationsAttribute.cs
- ILGenerator.cs
- SqlNodeAnnotation.cs
- StateElement.cs
- AdRotatorDesigner.cs
- SelectionRange.cs
- ClientRuntime.cs
- WebRequest.cs
- Assembly.cs
- IncrementalCompileAnalyzer.cs
- CryptoConfig.cs
- TypeExtensions.cs
- MarkupCompilePass1.cs
- ReversePositionQuery.cs
- WmpBitmapDecoder.cs
- BooleanExpr.cs
- DataSourceHelper.cs
- TaskHelper.cs
- Activator.cs
- EntityViewContainer.cs
- ImmutableObjectAttribute.cs
- OracleInfoMessageEventArgs.cs
- Property.cs
- SafeEventLogWriteHandle.cs
- UnionCqlBlock.cs
- StringToken.cs
- HtmlInputReset.cs
- MessageLoggingFilterTraceRecord.cs
- OdbcStatementHandle.cs
- InputScopeConverter.cs
- DocumentViewerBaseAutomationPeer.cs
- BamlResourceDeserializer.cs
- TemplateField.cs
- ResolveResponse.cs
- ContractTypeNameElement.cs
- WebPartConnectionsCancelEventArgs.cs
- HttpListenerRequest.cs
- XmlAutoDetectWriter.cs
- ByteRangeDownloader.cs
- UrlMapping.cs
- Int32CollectionConverter.cs
- SqlRetyper.cs
- RenderDataDrawingContext.cs
- ManagedWndProcTracker.cs
- CodeTypeDeclarationCollection.cs
- AnnotationAuthorChangedEventArgs.cs
- Psha1DerivedKeyGeneratorHelper.cs
- TextElement.cs
- DataSourceHelper.cs
- PostBackOptions.cs
- MessageEncoder.cs
- MonikerProxyAttribute.cs
- Baml2006KeyRecord.cs
- XmlTypeAttribute.cs
- IDReferencePropertyAttribute.cs
- SRef.cs
- XmlNotation.cs
- TypeInitializationException.cs
- ProtectedConfigurationSection.cs
- MdiWindowListItemConverter.cs
- SiblingIterators.cs
- HttpStreamMessageEncoderFactory.cs
- FunctionCommandText.cs
- LinkedResource.cs
- SoapAttributeOverrides.cs
- MessageContractMemberAttribute.cs
- HttpContext.cs
- ClientEventManager.cs
- PieceDirectory.cs
- Model3D.cs
- HostElement.cs
- X509PeerCertificateElement.cs
- DataSourceControl.cs
- SmiEventSink.cs
- MailWebEventProvider.cs
- SerializationInfo.cs
- GeneralTransform.cs
- InProcStateClientManager.cs
- DbParameterHelper.cs
- DBCommand.cs
- RadialGradientBrush.cs
- Paragraph.cs
- MenuItem.cs
- ExternalCalls.cs
- ObjectDataSourceFilteringEventArgs.cs
- InputBindingCollection.cs
- SlipBehavior.cs
- TemplatePagerField.cs
- SamlConstants.cs
- SystemColorTracker.cs
- IDReferencePropertyAttribute.cs
- GridErrorDlg.cs
- XmlSchemaImporter.cs
- TableItemStyle.cs
- GcHandle.cs
- Brush.cs
- SubstitutionList.cs