Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DependencyStoreSurrogate.cs
- CheckableControlBaseAdapter.cs
- ObjectQueryState.cs
- sqlinternaltransaction.cs
- EventProviderWriter.cs
- XmlSchemaValidationException.cs
- DataControlFieldCollection.cs
- ColorContext.cs
- AsyncPostBackTrigger.cs
- HostVisual.cs
- PageContentCollection.cs
- RSACryptoServiceProvider.cs
- OpacityConverter.cs
- PasswordDeriveBytes.cs
- Journaling.cs
- RuntimeHelpers.cs
- RoleProviderPrincipal.cs
- WorkflowInstanceTerminatedRecord.cs
- HandleCollector.cs
- ScrollBarRenderer.cs
- SqlMethodAttribute.cs
- validation.cs
- Opcode.cs
- Light.cs
- Scripts.cs
- DataListCommandEventArgs.cs
- SecurityDocument.cs
- SplitContainerDesigner.cs
- OdbcConnectionPoolProviderInfo.cs
- QueryContinueDragEvent.cs
- WorkflowDesignerColors.cs
- HttpProfileGroupBase.cs
- KnownTypeHelper.cs
- ShapeTypeface.cs
- SerialErrors.cs
- EpmCustomContentSerializer.cs
- DockProviderWrapper.cs
- InternalException.cs
- HostingEnvironmentException.cs
- versioninfo.cs
- EntityModelBuildProvider.cs
- GroupQuery.cs
- GetLedgerRequest.cs
- HttpRuntime.cs
- ToolStripItemEventArgs.cs
- Pair.cs
- ActivityExecutorSurrogate.cs
- ParseHttpDate.cs
- BitmapMetadata.cs
- Properties.cs
- PersonalizationStateInfoCollection.cs
- TextDecorationCollection.cs
- RootDesignerSerializerAttribute.cs
- ApplicationSecurityInfo.cs
- OAVariantLib.cs
- TypeExtension.cs
- AssertSection.cs
- IisTraceWebEventProvider.cs
- InputLanguage.cs
- PropertyGridView.cs
- StatusBarDesigner.cs
- EventKeyword.cs
- Container.cs
- DockingAttribute.cs
- XmlSchemaAttributeGroup.cs
- ValueUtilsSmi.cs
- InvokeHandlers.cs
- TableAdapterManagerGenerator.cs
- DeclaredTypeValidatorAttribute.cs
- XmlSchemaComplexContentExtension.cs
- RegistryExceptionHelper.cs
- HostingEnvironmentException.cs
- CommandBindingCollection.cs
- documentsequencetextview.cs
- MenuScrollingVisibilityConverter.cs
- XmlAtomicValue.cs
- RowParagraph.cs
- RepeaterItemEventArgs.cs
- ClientConfigurationSystem.cs
- IntellisenseTextBox.designer.cs
- CodeDOMProvider.cs
- ProcessModuleCollection.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- BindingValueChangedEventArgs.cs
- followingquery.cs
- unsafenativemethodsother.cs
- ButtonChrome.cs
- NameTable.cs
- DictionarySectionHandler.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- AdjustableArrowCap.cs
- StringPropertyBuilder.cs
- HandlerBase.cs
- HelpInfo.cs
- SystemIPAddressInformation.cs
- ToolStripGrip.cs
- TableSectionStyle.cs
- PropertyEmitter.cs
- BrowserInteropHelper.cs
- AssemblyInfo.cs