Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- xmlglyphRunInfo.cs
- SecurityUniqueId.cs
- IndentTextWriter.cs
- Inflater.cs
- FrameSecurityDescriptor.cs
- ReferenceService.cs
- WebPartZoneCollection.cs
- SchemaTypeEmitter.cs
- VersionPair.cs
- PointValueSerializer.cs
- Filter.cs
- ListViewDeleteEventArgs.cs
- SrgsElementFactoryCompiler.cs
- Point3DCollectionValueSerializer.cs
- WebPartConnectionsEventArgs.cs
- ContentFileHelper.cs
- RequestResizeEvent.cs
- GridItemCollection.cs
- InheritanceContextChangedEventManager.cs
- KerberosSecurityTokenAuthenticator.cs
- InvalidateEvent.cs
- httpserverutility.cs
- Pair.cs
- BamlLocalizableResource.cs
- UserInitiatedNavigationPermission.cs
- SetterBase.cs
- PointAnimationClockResource.cs
- RelatedCurrencyManager.cs
- baseaxisquery.cs
- SynchronizedDisposablePool.cs
- RepeaterItemEventArgs.cs
- BindUriHelper.cs
- TrackingMemoryStream.cs
- Main.cs
- LineSegment.cs
- Sentence.cs
- SignedPkcs7.cs
- TabControlToolboxItem.cs
- TraceInternal.cs
- ConfigurationSectionHelper.cs
- ServiceNameElement.cs
- ChtmlPhoneCallAdapter.cs
- HtmlForm.cs
- SelectingProviderEventArgs.cs
- StringUtil.cs
- DataGridTextBox.cs
- ListParaClient.cs
- SoapExtensionTypeElementCollection.cs
- AsyncCompletedEventArgs.cs
- AbstractDataSvcMapFileLoader.cs
- ADMembershipUser.cs
- ControlTemplate.cs
- MetadataSerializer.cs
- RegexBoyerMoore.cs
- PeerObject.cs
- FindCriteriaElement.cs
- SqlCacheDependencyDatabase.cs
- ConversionContext.cs
- AdPostCacheSubstitution.cs
- StylusPlugInCollection.cs
- ReadOnlyMetadataCollection.cs
- EraserBehavior.cs
- ResourceDictionary.cs
- HTMLTagNameToTypeMapper.cs
- CapabilitiesRule.cs
- _AcceptOverlappedAsyncResult.cs
- DataSourceSelectArguments.cs
- IntSecurity.cs
- Barrier.cs
- DirtyTextRange.cs
- SqlProfileProvider.cs
- WebResourceUtil.cs
- CharacterBuffer.cs
- DrawingGroupDrawingContext.cs
- HtmlValidationSummaryAdapter.cs
- TextRange.cs
- EdmItemCollection.cs
- TextProperties.cs
- DesignerRegionCollection.cs
- AssemblyBuilderData.cs
- WhitespaceRule.cs
- ToolStripPanelSelectionGlyph.cs
- FontCollection.cs
- WebRequest.cs
- DesignerRegion.cs
- ViewManager.cs
- RepeatBehaviorConverter.cs
- RelatedPropertyManager.cs
- InstanceDataCollectionCollection.cs
- DeploymentSection.cs
- MILUtilities.cs
- Binding.cs
- SqlDataSourceCommandEventArgs.cs
- XmlCDATASection.cs
- FileDialog_Vista_Interop.cs
- SourceInterpreter.cs
- ExpressionPrefixAttribute.cs
- SQLMembershipProvider.cs
- BackgroundWorker.cs
- StringArrayConverter.cs