Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / MS / Internal / Automation / ClientSideQueueItem.cs / 1305600 / 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
- OdbcDataAdapter.cs
- ApplicationServiceHelper.cs
- IsolatedStorageFileStream.cs
- TextServicesContext.cs
- ActiveXContainer.cs
- FacetDescription.cs
- SmiXetterAccessMap.cs
- DrawingDrawingContext.cs
- AnimationException.cs
- TreeNodeCollectionEditorDialog.cs
- ManagementEventWatcher.cs
- DurableOperationAttribute.cs
- SchemaTableOptionalColumn.cs
- DecimalSumAggregationOperator.cs
- EntityContainerEmitter.cs
- ConnectionProviderAttribute.cs
- InstanceKeyNotReadyException.cs
- DecoderNLS.cs
- SqlWebEventProvider.cs
- TextSelectionHighlightLayer.cs
- MetadataHelper.cs
- securitymgrsite.cs
- AssociatedControlConverter.cs
- RadioButtonList.cs
- DiscreteKeyFrames.cs
- OleAutBinder.cs
- XmlTextReaderImplHelpers.cs
- EventPrivateKey.cs
- DataRow.cs
- SupportingTokenAuthenticatorSpecification.cs
- _ServiceNameStore.cs
- FontResourceCache.cs
- BinHexEncoder.cs
- ContainerUIElement3D.cs
- RijndaelManaged.cs
- RoleService.cs
- MappingMetadataHelper.cs
- querybuilder.cs
- FlowDocument.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- InplaceBitmapMetadataWriter.cs
- InvalidPipelineStoreException.cs
- MethodAccessException.cs
- SafeEventLogReadHandle.cs
- DataTransferEventArgs.cs
- IndicShape.cs
- ExpressionVisitorHelpers.cs
- CommandManager.cs
- WbemException.cs
- UpnEndpointIdentity.cs
- RayHitTestParameters.cs
- Int32RectConverter.cs
- InvokeMethodDesigner.xaml.cs
- HttpModulesInstallComponent.cs
- ProcessInputEventArgs.cs
- RichTextBox.cs
- Registry.cs
- PrinterResolution.cs
- RSACryptoServiceProvider.cs
- SchemaElementDecl.cs
- _SingleItemRequestCache.cs
- FlowDocumentPageViewerAutomationPeer.cs
- SetStoryboardSpeedRatio.cs
- BasicExpressionVisitor.cs
- ToggleButtonAutomationPeer.cs
- Rotation3D.cs
- TemplatePagerField.cs
- TextElementAutomationPeer.cs
- DebugView.cs
- CircleHotSpot.cs
- FrameSecurityDescriptor.cs
- SqlDependencyUtils.cs
- ErrorHandlerFaultInfo.cs
- If.cs
- RedirectionProxy.cs
- TypeDescriptor.cs
- Win32PrintDialog.cs
- WorkflowMarkupSerializationManager.cs
- XmlSchemaAttribute.cs
- TreeViewEvent.cs
- CounterCreationData.cs
- SafePEFileHandle.cs
- ArglessEventHandlerProxy.cs
- FilteredXmlReader.cs
- Journaling.cs
- PhysicalFontFamily.cs
- TextBoxAutoCompleteSourceConverter.cs
- OptionalColumn.cs
- BoundingRectTracker.cs
- StylusEditingBehavior.cs
- SqlConnectionPoolProviderInfo.cs
- CompiledQuery.cs
- CommonObjectSecurity.cs
- SID.cs
- TiffBitmapEncoder.cs
- TitleStyle.cs
- SharedConnectionInfo.cs
- AccessorTable.cs
- WindowsFormsSynchronizationContext.cs
- ValueHandle.cs