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
- ArgumentException.cs
- CanonicalFontFamilyReference.cs
- GlyphElement.cs
- RequestCachingSection.cs
- WindowsIdentity.cs
- GroupBoxAutomationPeer.cs
- ProjectionCamera.cs
- RegexMatchCollection.cs
- SimpleNameService.cs
- ViewStateAttachedPropertyFeature.cs
- CodeLinePragma.cs
- ConnectionStringsExpressionBuilder.cs
- ExtractCollection.cs
- Array.cs
- ImageFormat.cs
- ConfigurationElementCollection.cs
- ConfigXmlWhitespace.cs
- Decoder.cs
- PeerPresenceInfo.cs
- DataGridViewToolTip.cs
- ToolStripPanel.cs
- WebPartAuthorizationEventArgs.cs
- UnauthorizedAccessException.cs
- Visitors.cs
- StreamInfo.cs
- DataGridViewCellValueEventArgs.cs
- HiddenField.cs
- FormattedText.cs
- WebPartMinimizeVerb.cs
- SerialReceived.cs
- LambdaCompiler.Statements.cs
- RewritingValidator.cs
- ListBindingHelper.cs
- DesignerAttributeInfo.cs
- AutomationPropertyInfo.cs
- EllipseGeometry.cs
- SqlUtil.cs
- TreeNodeStyle.cs
- AttachedAnnotation.cs
- XmlNullResolver.cs
- Validator.cs
- GenericsInstances.cs
- TextProperties.cs
- XmlSchemaComplexContent.cs
- ADMembershipProvider.cs
- CodeGeneratorOptions.cs
- ScriptingRoleServiceSection.cs
- CodeArrayIndexerExpression.cs
- KeyFrames.cs
- KerberosTicketHashIdentifierClause.cs
- Int32Collection.cs
- FolderBrowserDialog.cs
- HebrewCalendar.cs
- SerTrace.cs
- ErrorsHelper.cs
- InternalBufferManager.cs
- StatusBarItemAutomationPeer.cs
- SafeUserTokenHandle.cs
- SortedDictionary.cs
- MetaModel.cs
- ClientScriptManager.cs
- BooleanConverter.cs
- DbTransaction.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- DbConnectionPoolGroupProviderInfo.cs
- XmlMemberMapping.cs
- Emitter.cs
- ServiceChannelFactory.cs
- SqlNotificationRequest.cs
- CurrentChangedEventManager.cs
- WebMethodAttribute.cs
- IImplicitResourceProvider.cs
- Completion.cs
- DBCommandBuilder.cs
- DataGridViewAdvancedBorderStyle.cs
- ViewCellSlot.cs
- ArrayElementGridEntry.cs
- SqlDelegatedTransaction.cs
- SudsCommon.cs
- UnsafePeerToPeerMethods.cs
- Vector3D.cs
- TextContainer.cs
- HeaderedItemsControl.cs
- WebServiceBindingAttribute.cs
- ChannelSinkStacks.cs
- DesignerForm.cs
- Rfc2898DeriveBytes.cs
- StoreUtilities.cs
- KeyInstance.cs
- DataGridColumn.cs
- UserMapPath.cs
- HtmlInputButton.cs
- SiteMembershipCondition.cs
- DataGridColumn.cs
- EncryptedKey.cs
- XmlTextReader.cs
- Win32Native.cs
- DiffuseMaterial.cs
- EventManager.cs
- StringBlob.cs