Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / AccessibleTech / longhorn / Automation / UIAutomationClient / System / Windows / Automation / AutomationElementCollection.cs / 1 / AutomationElementCollection.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Read-only collection of AutomationElements - effectively a // wrapper for Array // // History: // 03/08/2004 : [....] - Created // //--------------------------------------------------------------------------- using System; using System.Collections; using MS.Internal.Automation; namespace System.Windows.Automation { ////// A read-only collection of AutomationElement objects /// #if (INTERNAL_COMPILE) internal class AutomationElementCollection: ICollection #else public class AutomationElementCollection: ICollection #endif { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal AutomationElementCollection(AutomationElement[] elements) { _elements = elements; } #endregion Constructors //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- #region Public Properties ////// Returns the specified item in this collection /// public AutomationElement this[int index] { get { return _elements[ index ]; } } #endregion Public Properties //------------------------------------------------------ // // Interface ICollection // //------------------------------------------------------ #region Interface ICollection ////// Copies all the elements of the current collection to the specified one-dimensional Array. /// public virtual void CopyTo( Array array, int index ) { _elements.CopyTo( array, index ); } ////// Copies all the elements of the current collection to the specified one-dimensional Array. /// public void CopyTo(AutomationElement[] array, int index) { ((ICollection)this).CopyTo(array, index); } ////// Returns the number of elements in this collection /// public int Count { get { return _elements.Length; } } ////// Gets an object that can be used to synchronize access to the collection. /// public virtual Object SyncRoot { get { // Don't return _elements.SyncRoot, since that may leak a reference to the array, // allowing it to be modified. return this; } } ////// Gets a value indicating whether access to the collection is synchronized (thread-safe). /// public virtual bool IsSynchronized { get { return false; } } ////// Returns an IEnumerator for the collection /// public IEnumerator GetEnumerator() { return _elements.GetEnumerator(); } #endregion Interface ICollection //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private AutomationElement[] _elements; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeTypeParameterCollection.cs
- WsrmMessageInfo.cs
- ListBox.cs
- TableCellCollection.cs
- GeneralTransform3DTo2DTo3D.cs
- SqlFunctionAttribute.cs
- Utility.cs
- MsmqChannelFactory.cs
- DefaultWorkflowTransactionService.cs
- BindingBase.cs
- BitStack.cs
- EventDescriptor.cs
- ComplexTypeEmitter.cs
- MimePart.cs
- DataServices.cs
- DataBinder.cs
- Matrix3DValueSerializer.cs
- RuntimeVariableList.cs
- XmlSchemaComplexContentRestriction.cs
- EmptyControlCollection.cs
- DescriptionAttribute.cs
- HtmlGenericControl.cs
- ParagraphResult.cs
- Interlocked.cs
- ChangePasswordDesigner.cs
- SQLInt32Storage.cs
- PointKeyFrameCollection.cs
- HttpListenerRequestUriBuilder.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CodeMemberField.cs
- DataTableReader.cs
- SqlDelegatedTransaction.cs
- WebBodyFormatMessageProperty.cs
- HttpWebRequestElement.cs
- NameValueFileSectionHandler.cs
- XamlSerializerUtil.cs
- FunctionQuery.cs
- StringOutput.cs
- TagPrefixInfo.cs
- FixedPageProcessor.cs
- BuildProviderAppliesToAttribute.cs
- DesignTimeXamlWriter.cs
- StateManagedCollection.cs
- XsdDataContractImporter.cs
- ColorInterpolationModeValidation.cs
- HttpModuleActionCollection.cs
- Base64Encoding.cs
- CharacterBufferReference.cs
- PropertyInformation.cs
- ApplicationFileCodeDomTreeGenerator.cs
- RowsCopiedEventArgs.cs
- ObservableDictionary.cs
- DataRecordInfo.cs
- StringDictionary.cs
- GridViewRowEventArgs.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- DropShadowBitmapEffect.cs
- Simplifier.cs
- _BufferOffsetSize.cs
- PaperSize.cs
- DataSourceXmlAttributeAttribute.cs
- FontStyleConverter.cs
- TextWriterTraceListener.cs
- XPathSingletonIterator.cs
- DynamicRenderer.cs
- DataGridViewCellStyleEditor.cs
- DesigntimeLicenseContext.cs
- ApplicationId.cs
- _BasicClient.cs
- DataControlLinkButton.cs
- UrlUtility.cs
- ContourSegment.cs
- ZipIOFileItemStream.cs
- StringComparer.cs
- DropDownButton.cs
- EraserBehavior.cs
- SqlEnums.cs
- Color.cs
- Registry.cs
- WebDisplayNameAttribute.cs
- RenderData.cs
- DataGridSortCommandEventArgs.cs
- SmiEventSink_DeferedProcessing.cs
- DataControlFieldCell.cs
- TransformedBitmap.cs
- StatusBarPanel.cs
- SHA256Cng.cs
- AnyReturnReader.cs
- ZipIOCentralDirectoryBlock.cs
- ControlAdapter.cs
- ServiceOperationHelpers.cs
- EncodingFallbackAwareXmlTextWriter.cs
- RichTextBox.cs
- LineMetrics.cs
- RTLAwareMessageBox.cs
- AllMembershipCondition.cs
- oledbconnectionstring.cs
- DoubleIndependentAnimationStorage.cs
- ColorTransformHelper.cs
- QilFunction.cs