Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / UIAutomation / UIAutomationClient / MS / Internal / Automation / ClientSideQueueItem.cs / 1 / ClientSideQueueItem.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Class to create a queue on its own thread. // // History: // 06/17/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System.Windows.Automation; using System.Windows.Automation.Provider; using System; using System.Collections; using System.ComponentModel; using MS.Internal.Automation; using MS.Win32; namespace MS.Internal.Automation { // Worker class used to queue events that originated on the client side (e.g. // used by focus and top-level window tracking to queue WinEvent information). internal class ClientSideQueueItem : QueueItem { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal ClientSideQueueItem(Delegate clientCallback, AutomationElement srcEl, UiaCoreApi.UiaCacheRequest request, AutomationEventArgs e) { _clientCallback = clientCallback; _srcEl = srcEl; _request = request; _e = e; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal override void Process() { // Grab properties for cache request here... AutomationElement src; if (_srcEl == null) { src = null; } else { UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_srcEl.RawNode, _request, UiaCoreApi.NormalizeState.View, null); src = CacheHelper.BuildAutomationElementsFromResponse(_request, response); } // if (!(src == null && _e.EventId == AutomationElement.AutomationFocusChangedEvent)) InvokeHandlers.InvokeClientHandler(_clientCallback, src, _e); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields private Delegate _clientCallback; // a client callback delegate private AutomationElement _srcEl; // the source element private UiaCoreApi.UiaCacheRequest _request; // shopping list for prefetch private AutomationEventArgs _e; // the event args for the callback #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Class to create a queue on its own thread. // // History: // 06/17/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System.Windows.Automation; using System.Windows.Automation.Provider; using System; using System.Collections; using System.ComponentModel; using MS.Internal.Automation; using MS.Win32; namespace MS.Internal.Automation { // Worker class used to queue events that originated on the client side (e.g. // used by focus and top-level window tracking to queue WinEvent information). internal class ClientSideQueueItem : QueueItem { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal ClientSideQueueItem(Delegate clientCallback, AutomationElement srcEl, UiaCoreApi.UiaCacheRequest request, AutomationEventArgs e) { _clientCallback = clientCallback; _srcEl = srcEl; _request = request; _e = e; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal override void Process() { // Grab properties for cache request here... AutomationElement src; if (_srcEl == null) { src = null; } else { UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_srcEl.RawNode, _request, UiaCoreApi.NormalizeState.View, null); src = CacheHelper.BuildAutomationElementsFromResponse(_request, response); } // if (!(src == null && _e.EventId == AutomationElement.AutomationFocusChangedEvent)) InvokeHandlers.InvokeClientHandler(_clientCallback, src, _e); } #endregion Internal Methods //------------------------------------------------------ // // Private Fields // //------------------------------------------------------ #region Private Fields private Delegate _clientCallback; // a client callback delegate private AutomationElement _srcEl; // the source element private UiaCoreApi.UiaCacheRequest _request; // shopping list for prefetch private AutomationEventArgs _e; // the event args for the callback #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
- StringArrayConverter.cs
- IISUnsafeMethods.cs
- ModifierKeysValueSerializer.cs
- TranslateTransform3D.cs
- ConditionCollection.cs
- EnlistmentTraceIdentifier.cs
- ClientUtils.cs
- InputLangChangeEvent.cs
- FileVersion.cs
- nulltextnavigator.cs
- ParserOptions.cs
- ConfigurationManager.cs
- SafeRegistryHandle.cs
- DetailsViewUpdatedEventArgs.cs
- ScriptManager.cs
- SystemPens.cs
- VoiceInfo.cs
- CalendarTable.cs
- UnmanagedMarshal.cs
- ScrollEvent.cs
- CDSsyncETWBCLProvider.cs
- WpfXamlType.cs
- DbConnectionPoolIdentity.cs
- UpdateException.cs
- Padding.cs
- CompilationUtil.cs
- CompressEmulationStream.cs
- BamlResourceContent.cs
- ReadOnlyHierarchicalDataSource.cs
- Validator.cs
- ColumnResizeUndoUnit.cs
- MimeParameters.cs
- NameValuePermission.cs
- TextParaClient.cs
- SecurityToken.cs
- MoveSizeWinEventHandler.cs
- ToolBarButtonClickEvent.cs
- DirectoryRedirect.cs
- RootBuilder.cs
- QilLoop.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ContentValidator.cs
- IntPtr.cs
- MatrixConverter.cs
- EntityModelSchemaGenerator.cs
- URLIdentityPermission.cs
- TextBox.cs
- OrderByExpression.cs
- ListViewEditEventArgs.cs
- ListSortDescriptionCollection.cs
- CacheHelper.cs
- DataGridViewRowEventArgs.cs
- StrokeNodeOperations.cs
- UnsafeNativeMethods.cs
- StringValidator.cs
- EncodingNLS.cs
- Thumb.cs
- ISFClipboardData.cs
- WebPartCatalogCloseVerb.cs
- AdornerPresentationContext.cs
- WhileDesigner.cs
- DataGridViewButtonColumn.cs
- SQLRoleProvider.cs
- XmlIlGenerator.cs
- SID.cs
- Object.cs
- ConnectionPoint.cs
- SafeCoTaskMem.cs
- _SslSessionsCache.cs
- HuffCodec.cs
- BackStopAuthenticationModule.cs
- CSharpCodeProvider.cs
- StaticFileHandler.cs
- SemaphoreSlim.cs
- _NegotiateClient.cs
- XXXInfos.cs
- ReversePositionQuery.cs
- StringSorter.cs
- WorkItem.cs
- WebBaseEventKeyComparer.cs
- HostedHttpRequestAsyncResult.cs
- PolicyManager.cs
- TimeManager.cs
- login.cs
- SwitchElementsCollection.cs
- X509Certificate.cs
- _Semaphore.cs
- RightsManagementPermission.cs
- WorkflowLayouts.cs
- IODescriptionAttribute.cs
- GZipDecoder.cs
- SessionEndingEventArgs.cs
- FamilyTypeface.cs
- FunctionDetailsReader.cs
- CreateRefExpr.cs
- RequiredFieldValidator.cs
- CallbackValidatorAttribute.cs
- DATA_BLOB.cs
- DataColumnMapping.cs
- StorageRoot.cs