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
- Conditional.cs
- SystemDiagnosticsSection.cs
- OrderedHashRepartitionEnumerator.cs
- ColumnWidthChangedEvent.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- RegexStringValidator.cs
- PieceDirectory.cs
- ReadOnlyTernaryTree.cs
- ObjectNotFoundException.cs
- DispatcherEventArgs.cs
- ListViewTableCell.cs
- CalendarModeChangedEventArgs.cs
- GenericUriParser.cs
- CodeGenerator.cs
- CodeIndexerExpression.cs
- AuthorizationContext.cs
- ErrorFormatter.cs
- SemanticAnalyzer.cs
- KeyValuePairs.cs
- FieldToken.cs
- LongAverageAggregationOperator.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- XslAst.cs
- SqlDependencyListener.cs
- SpanIndex.cs
- MediaScriptCommandRoutedEventArgs.cs
- TemplateBindingExpressionConverter.cs
- RayHitTestParameters.cs
- OleDbFactory.cs
- ValidateNames.cs
- SolidBrush.cs
- Int32CAMarshaler.cs
- EmptyQuery.cs
- ContainerSelectorGlyph.cs
- MethodExpr.cs
- Transform.cs
- MultipartContentParser.cs
- Context.cs
- ImageDrawing.cs
- GetPageCompletedEventArgs.cs
- VScrollBar.cs
- CodePropertyReferenceExpression.cs
- RoleGroupCollection.cs
- Win32SafeHandles.cs
- ReflectPropertyDescriptor.cs
- XmlNavigatorStack.cs
- TimelineGroup.cs
- OrderedDictionary.cs
- Style.cs
- Pts.cs
- GregorianCalendarHelper.cs
- BinHexEncoding.cs
- MonthCalendarDesigner.cs
- ToolStripProgressBar.cs
- TransformGroup.cs
- WebEvents.cs
- EmbeddedObject.cs
- UrlPropertyAttribute.cs
- OdbcCommand.cs
- SqlGatherConsumedAliases.cs
- PeerHopCountAttribute.cs
- ExpressionWriter.cs
- BoundField.cs
- CodeEventReferenceExpression.cs
- Latin1Encoding.cs
- DataGrid.cs
- WorkflowInstanceExtensionManager.cs
- CommandHelper.cs
- HelpProvider.cs
- ComNativeDescriptor.cs
- MessageHeaders.cs
- DataGridParentRows.cs
- DataGridViewComboBoxColumn.cs
- DataRelationPropertyDescriptor.cs
- HitTestFilterBehavior.cs
- ResourceDictionary.cs
- FileDialogPermission.cs
- ContentPosition.cs
- ClientSponsor.cs
- ReaderWriterLockWrapper.cs
- ComPlusSynchronizationContext.cs
- XmlSchemaExternal.cs
- QueryException.cs
- GridItemCollection.cs
- AudioDeviceOut.cs
- StylusPointPropertyId.cs
- OutputWindow.cs
- SortedDictionary.cs
- CodeCommentStatementCollection.cs
- RawStylusInputCustomDataList.cs
- ListBase.cs
- Style.cs
- XmlException.cs
- NetNamedPipeSecurityElement.cs
- ScriptDescriptor.cs
- DurableInstanceProvider.cs
- SocketManager.cs
- SrgsElementList.cs
- MenuItemBindingCollection.cs
- DrawingGroup.cs