Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ConfigurationPropertyCollection.cs / 1 / ConfigurationPropertyCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; namespace System.Configuration { public class ConfigurationPropertyCollection : ICollection { private ArrayList _items = new ArrayList(); public int Count { get { return _items.Count; } } public bool IsSynchronized { get { return false; } } public Object SyncRoot { get { return _items; } } internal ConfigurationProperty DefaultCollectionProperty { get { return this[ConfigurationProperty.DefaultCollectionPropertyName]; } } void ICollection.CopyTo(Array array, int index) { _items.CopyTo(array, index); } public void CopyTo(ConfigurationProperty[] array, int index) { ((ICollection)this).CopyTo(array, index); } public IEnumerator GetEnumerator() { return _items.GetEnumerator(); } public ConfigurationProperty this[String name] { get { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return (ConfigurationProperty)_items[index]; } } return (ConfigurationProperty)null; } } public bool Contains(String name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return true; } } return false; } public void Add(ConfigurationProperty property) { if (Contains(property.Name) != true) { _items.Add(property); } } public bool Remove(string name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { _items.RemoveAt(index); return true; } } return false; } public void Clear() { _items.Clear(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; namespace System.Configuration { public class ConfigurationPropertyCollection : ICollection { private ArrayList _items = new ArrayList(); public int Count { get { return _items.Count; } } public bool IsSynchronized { get { return false; } } public Object SyncRoot { get { return _items; } } internal ConfigurationProperty DefaultCollectionProperty { get { return this[ConfigurationProperty.DefaultCollectionPropertyName]; } } void ICollection.CopyTo(Array array, int index) { _items.CopyTo(array, index); } public void CopyTo(ConfigurationProperty[] array, int index) { ((ICollection)this).CopyTo(array, index); } public IEnumerator GetEnumerator() { return _items.GetEnumerator(); } public ConfigurationProperty this[String name] { get { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return (ConfigurationProperty)_items[index]; } } return (ConfigurationProperty)null; } } public bool Contains(String name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { return true; } } return false; } public void Add(ConfigurationProperty property) { if (Contains(property.Name) != true) { _items.Add(property); } } public bool Remove(string name) { for (int index = 0; index < _items.Count; index++) { ConfigurationProperty cp = (ConfigurationProperty)_items[index]; if (cp.Name == name) { _items.RemoveAt(index); return true; } } return false; } public void Clear() { _items.Clear(); } } } // 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
- TextEffect.cs
- AnonymousIdentificationSection.cs
- DataServiceQueryException.cs
- XhtmlBasicListAdapter.cs
- Rijndael.cs
- BrowserCapabilitiesFactory.cs
- DesignTimeParseData.cs
- DataGridViewTextBoxColumn.cs
- StylusPointProperty.cs
- CompModHelpers.cs
- DataSourceConverter.cs
- QilBinary.cs
- ReadOnlyHierarchicalDataSource.cs
- AlternateViewCollection.cs
- DetailsViewUpdatedEventArgs.cs
- ConstraintManager.cs
- _LocalDataStoreMgr.cs
- ISO2022Encoding.cs
- OracleInternalConnection.cs
- FormatPage.cs
- JoinSymbol.cs
- GradientBrush.cs
- ControlIdConverter.cs
- ParseNumbers.cs
- CodeAttributeDeclarationCollection.cs
- EasingQuaternionKeyFrame.cs
- ControlValuePropertyAttribute.cs
- DateTimeValueSerializerContext.cs
- PathGeometry.cs
- CachedPathData.cs
- DataGridPagerStyle.cs
- PieceDirectory.cs
- DataGridViewSortCompareEventArgs.cs
- HtmlTable.cs
- CompositeActivityDesigner.cs
- ToolStripDropDownItemDesigner.cs
- BamlResourceSerializer.cs
- SelectionGlyph.cs
- StrokeNodeEnumerator.cs
- Parallel.cs
- ListBoxDesigner.cs
- InvokeBase.cs
- SAPICategories.cs
- SystemDiagnosticsSection.cs
- NavigateUrlConverter.cs
- RepeaterDesigner.cs
- HttpVersion.cs
- InputLangChangeRequestEvent.cs
- CallbackHandler.cs
- PerfService.cs
- ClientData.cs
- Walker.cs
- MarkupProperty.cs
- VBIdentifierDesigner.xaml.cs
- FontWeights.cs
- ArgumentOutOfRangeException.cs
- EncryptedPackage.cs
- DiagnosticsConfigurationHandler.cs
- XmlUtil.cs
- FrameworkElementFactoryMarkupObject.cs
- RegexMatchCollection.cs
- WindowClosedEventArgs.cs
- AsyncStreamReader.cs
- ContractType.cs
- RegexCode.cs
- QilDataSource.cs
- Section.cs
- HttpCookieCollection.cs
- NameTable.cs
- EventBookmark.cs
- PrinterSettings.cs
- TableLayoutPanel.cs
- NamedPipeHostedTransportConfiguration.cs
- ModifierKeysConverter.cs
- FlowDocumentView.cs
- ProcessInputEventArgs.cs
- DBBindings.cs
- InputScopeAttribute.cs
- CodeArrayCreateExpression.cs
- WebEventCodes.cs
- PenLineJoinValidation.cs
- Identity.cs
- Array.cs
- XPathDocumentIterator.cs
- IApplicationTrustManager.cs
- CodeAttributeArgumentCollection.cs
- InputBuffer.cs
- ShaderEffect.cs
- ReferenceTypeElement.cs
- GeometryDrawing.cs
- Item.cs
- ClientUrlResolverWrapper.cs
- ClientSession.cs
- DictionaryTraceRecord.cs
- OperatorExpressions.cs
- InputScope.cs
- ListViewItemSelectionChangedEvent.cs
- _TimerThread.cs
- CompositeFontParser.cs
- StateBag.cs