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
- MsmqProcessProtocolHandler.cs
- SqlTypeConverter.cs
- StylusPointPropertyId.cs
- OracleCommandSet.cs
- SoapAttributeAttribute.cs
- Package.cs
- NetCodeGroup.cs
- CapabilitiesPattern.cs
- ControlCollection.cs
- PageContentCollection.cs
- CursorConverter.cs
- StringInfo.cs
- SqlDataSourceCache.cs
- HostedBindingBehavior.cs
- SqlMethodAttribute.cs
- ListGeneralPage.cs
- DesignerDataColumn.cs
- ResponseStream.cs
- TrackingMemoryStream.cs
- RouteParser.cs
- StrokeCollection.cs
- CriticalFinalizerObject.cs
- DesignerDataRelationship.cs
- BufferedMessageData.cs
- ObjectDataSourceSelectingEventArgs.cs
- DrawingBrush.cs
- DelegateSerializationHolder.cs
- HtmlTernaryTree.cs
- DoubleAnimation.cs
- MailBnfHelper.cs
- SafePEFileHandle.cs
- MappingSource.cs
- LinkedResourceCollection.cs
- ClientScriptManager.cs
- SoapFault.cs
- CurrentChangedEventManager.cs
- GacUtil.cs
- ButtonFieldBase.cs
- EntityStoreSchemaGenerator.cs
- GorillaCodec.cs
- FilterableAttribute.cs
- TextBoxRenderer.cs
- Configuration.cs
- EUCJPEncoding.cs
- LongTypeConverter.cs
- HttpModuleAction.cs
- COM2ColorConverter.cs
- DefaultValidator.cs
- ReachDocumentSequenceSerializerAsync.cs
- PerformanceCounterCategory.cs
- TimelineCollection.cs
- Debugger.cs
- SwitchElementsCollection.cs
- HttpHandlersSection.cs
- RNGCryptoServiceProvider.cs
- KeyGestureConverter.cs
- ActivityDesignerAccessibleObject.cs
- WCFServiceClientProxyGenerator.cs
- _emptywebproxy.cs
- SkewTransform.cs
- HostVisual.cs
- Model3D.cs
- SmtpAuthenticationManager.cs
- RectAnimationBase.cs
- XmlTextReaderImpl.cs
- IsolatedStorageFilePermission.cs
- Typography.cs
- EmptyStringExpandableObjectConverter.cs
- ByteRangeDownloader.cs
- WebBrowserContainer.cs
- GeneralTransform3DGroup.cs
- DATA_BLOB.cs
- DispatcherEventArgs.cs
- Viewport2DVisual3D.cs
- WebPartAuthorizationEventArgs.cs
- RequestQueue.cs
- UnsafeNativeMethods.cs
- CompoundFileStreamReference.cs
- SkewTransform.cs
- ExtensionDataObject.cs
- IUnknownConstantAttribute.cs
- CompilationLock.cs
- AppDomainFactory.cs
- FontNameConverter.cs
- SqlNodeAnnotation.cs
- HtmlInputButton.cs
- WSSecurityTokenSerializer.cs
- FileDialog.cs
- BasicExpressionVisitor.cs
- TextTreeRootTextBlock.cs
- SessionViewState.cs
- XamlStream.cs
- PasswordBox.cs
- BufferBuilder.cs
- MethodBody.cs
- DetailsViewInsertedEventArgs.cs
- CheckBoxRenderer.cs
- TaskFormBase.cs
- StateChangeEvent.cs
- SqlTypesSchemaImporter.cs