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
- Baml2006ReaderSettings.cs
- PreloadHost.cs
- SinglePageViewer.cs
- TrustLevelCollection.cs
- SqlConnectionStringBuilder.cs
- TreeViewImageGenerator.cs
- HttpApplicationStateWrapper.cs
- LoginCancelEventArgs.cs
- COM2ComponentEditor.cs
- Win32.cs
- QilExpression.cs
- GeometryModel3D.cs
- DataTableReader.cs
- Activator.cs
- RuntimeConfig.cs
- FramingEncoders.cs
- ObjectDataSourceEventArgs.cs
- SafeReversePInvokeHandle.cs
- CounterSetInstanceCounterDataSet.cs
- UpdatePanelControlTrigger.cs
- StateMachineDesignerPaint.cs
- pingexception.cs
- StatusBar.cs
- Point3DAnimationBase.cs
- Block.cs
- NullableBoolConverter.cs
- JobPageOrder.cs
- EventLog.cs
- MemberBinding.cs
- LiteralControl.cs
- KnownBoxes.cs
- ConfigPathUtility.cs
- ElementHostPropertyMap.cs
- XDeferredAxisSource.cs
- ArrayElementGridEntry.cs
- OperationPickerDialog.cs
- ActivityWithResultWrapper.cs
- BinaryParser.cs
- FormsAuthenticationEventArgs.cs
- UTF32Encoding.cs
- ArrayTypeMismatchException.cs
- LinqDataView.cs
- Symbol.cs
- RelatedView.cs
- Stroke2.cs
- ThreadExceptionEvent.cs
- SubtreeProcessor.cs
- PerformanceCounter.cs
- RowSpanVector.cs
- DataTablePropertyDescriptor.cs
- NCryptSafeHandles.cs
- InstanceDataCollectionCollection.cs
- SemanticBasicElement.cs
- ListSortDescriptionCollection.cs
- RemoteWebConfigurationHostStream.cs
- OleDbTransaction.cs
- ToolstripProfessionalRenderer.cs
- WebPartDisplayModeEventArgs.cs
- ResourcesGenerator.cs
- PlainXmlDeserializer.cs
- TabControl.cs
- XmlMemberMapping.cs
- TextPointer.cs
- ScriptBehaviorDescriptor.cs
- DebugView.cs
- DomNameTable.cs
- NamespaceDecl.cs
- CursorInteropHelper.cs
- Bits.cs
- EncoderExceptionFallback.cs
- SchemaSetCompiler.cs
- AutomationPropertyInfo.cs
- RuntimeResourceSet.cs
- GeneratedContractType.cs
- XmlILModule.cs
- UnauthorizedAccessException.cs
- RadialGradientBrush.cs
- SmtpAuthenticationManager.cs
- StoreAnnotationsMap.cs
- HttpCacheVary.cs
- SyndicationSerializer.cs
- CharKeyFrameCollection.cs
- LineBreak.cs
- TextEditorThreadLocalStore.cs
- BulletDecorator.cs
- KoreanLunisolarCalendar.cs
- Activity.cs
- ItemCheckEvent.cs
- Image.cs
- ImportedNamespaceContextItem.cs
- ConstraintStruct.cs
- XamlClipboardData.cs
- IncrementalHitTester.cs
- DataSourceCacheDurationConverter.cs
- DataViewManagerListItemTypeDescriptor.cs
- MatchNoneMessageFilter.cs
- RelationshipConverter.cs
- FixedDocumentSequencePaginator.cs
- RemoteWebConfigurationHost.cs
- XmlSchemaInclude.cs