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
- PreloadedPackages.cs
- HatchBrush.cs
- SecureConversationServiceCredential.cs
- TriggerCollection.cs
- X509Utils.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ApplicationDirectoryMembershipCondition.cs
- TransactedReceiveScope.cs
- ListView.cs
- ForceCopyBuildProvider.cs
- TextBox.cs
- BatchWriter.cs
- SqlStream.cs
- SafeProcessHandle.cs
- SelectorItemAutomationPeer.cs
- QueryGenerator.cs
- EventData.cs
- ElapsedEventArgs.cs
- WizardPanel.cs
- SendingRequestEventArgs.cs
- _NegoState.cs
- StrokeFIndices.cs
- DesignSurface.cs
- EdmMember.cs
- InkPresenter.cs
- DirtyTextRange.cs
- AppLevelCompilationSectionCache.cs
- XPathSelectionIterator.cs
- WindowsListViewScroll.cs
- WorkflowService.cs
- EffectiveValueEntry.cs
- CharacterString.cs
- IMembershipProvider.cs
- IdnElement.cs
- AppDomainAttributes.cs
- QuaternionRotation3D.cs
- SizeAnimationBase.cs
- RecordManager.cs
- TemplateBuilder.cs
- InstanceDataCollection.cs
- LineInfo.cs
- IgnoreFileBuildProvider.cs
- Grant.cs
- CodeVariableDeclarationStatement.cs
- Int64Converter.cs
- GetBrowserTokenRequest.cs
- ThemeableAttribute.cs
- QuaternionIndependentAnimationStorage.cs
- ProvidePropertyAttribute.cs
- Baml2006ReaderSettings.cs
- RoleGroupCollection.cs
- PartialClassGenerationTaskInternal.cs
- precedingquery.cs
- JulianCalendar.cs
- TiffBitmapEncoder.cs
- JsonFormatGeneratorStatics.cs
- BitmapEffectOutputConnector.cs
- TrustLevelCollection.cs
- EnumDataContract.cs
- ConfigXmlText.cs
- ComponentCollection.cs
- WindowsListViewItem.cs
- XmlStreamNodeWriter.cs
- NoClickablePointException.cs
- PrintDialog.cs
- SimpleHandlerFactory.cs
- CustomCredentialPolicy.cs
- FastEncoderWindow.cs
- SqlClientWrapperSmiStreamChars.cs
- ClassicBorderDecorator.cs
- SignatureDescription.cs
- ToolStripLabel.cs
- XmlQualifiedNameTest.cs
- DataSourceView.cs
- EncodingDataItem.cs
- GenericTypeParameterBuilder.cs
- DeploymentSectionCache.cs
- ImageMapEventArgs.cs
- BindingMemberInfo.cs
- BamlTreeMap.cs
- Speller.cs
- DesignerActionGlyph.cs
- StickyNoteContentControl.cs
- XhtmlTextWriter.cs
- StringReader.cs
- COM2FontConverter.cs
- UInt64.cs
- userdatakeys.cs
- _UriTypeConverter.cs
- SafeFindHandle.cs
- OutputCacheProfileCollection.cs
- HttpPostedFileWrapper.cs
- SafeFileMapViewHandle.cs
- MissingSatelliteAssemblyException.cs
- BaseTreeIterator.cs
- storagemappingitemcollection.viewdictionary.cs
- XmlTextAttribute.cs
- _BufferOffsetSize.cs
- InputScopeNameConverter.cs
- HMACSHA1.cs