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
- RegularExpressionValidator.cs
- RowParagraph.cs
- Material.cs
- BamlCollectionHolder.cs
- XmlElement.cs
- fixedPageContentExtractor.cs
- TraceListeners.cs
- DynamicDataResources.Designer.cs
- Activator.cs
- Component.cs
- Vector3DIndependentAnimationStorage.cs
- ASCIIEncoding.cs
- DataServiceQueryException.cs
- ConnectionInterfaceCollection.cs
- ControlUtil.cs
- SqlUserDefinedTypeAttribute.cs
- ConfigurationManagerInternalFactory.cs
- Size3DConverter.cs
- AnimationTimeline.cs
- SqlInternalConnectionSmi.cs
- GacUtil.cs
- KeyConstraint.cs
- BindingMAnagerBase.cs
- PageAdapter.cs
- ObjectQueryExecutionPlan.cs
- SqlParameterizer.cs
- XsdDateTime.cs
- BrowsableAttribute.cs
- DbCommandDefinition.cs
- StretchValidation.cs
- SkipStoryboardToFill.cs
- CompressStream.cs
- _FtpControlStream.cs
- QueryPageSettingsEventArgs.cs
- SimpleLine.cs
- StringDictionary.cs
- TextElementCollection.cs
- ThousandthOfEmRealPoints.cs
- MetadataArtifactLoaderFile.cs
- CharacterShapingProperties.cs
- OlePropertyStructs.cs
- DesignerCategoryAttribute.cs
- Math.cs
- WindowsSidIdentity.cs
- ContentPlaceHolder.cs
- SamlSubject.cs
- CodeEntryPointMethod.cs
- ContextMenuStripActionList.cs
- IntellisenseTextBox.cs
- EntityClientCacheEntry.cs
- GlyphTypeface.cs
- Expression.cs
- ValueUnavailableException.cs
- RootProfilePropertySettingsCollection.cs
- KeyValueConfigurationElement.cs
- InkSerializer.cs
- NotifyParentPropertyAttribute.cs
- HttpModuleActionCollection.cs
- Function.cs
- WsdlBuildProvider.cs
- ActivityMarkupSerializer.cs
- SafeCryptHandles.cs
- FormViewModeEventArgs.cs
- ReachPrintTicketSerializerAsync.cs
- Size.cs
- SQLBinaryStorage.cs
- NeutralResourcesLanguageAttribute.cs
- SqlDataSourceCache.cs
- Keyboard.cs
- CommittableTransaction.cs
- LeafCellTreeNode.cs
- LoadedOrUnloadedOperation.cs
- TimeoutHelper.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- AddInAttribute.cs
- AbsoluteQuery.cs
- TypeReference.cs
- DynamicPropertyHolder.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- ColumnClickEvent.cs
- ScriptingJsonSerializationSection.cs
- ProxyElement.cs
- InvalidMessageContractException.cs
- FileDialogPermission.cs
- TriggerAction.cs
- ValueTable.cs
- HtmlWindow.cs
- TextMetrics.cs
- DataErrorValidationRule.cs
- EmptyStringExpandableObjectConverter.cs
- DummyDataSource.cs
- RelationshipEnd.cs
- NumberAction.cs
- TypedReference.cs
- DesignerVerbToolStripMenuItem.cs
- WebDisplayNameAttribute.cs
- ScriptResourceInfo.cs
- AssemblyUtil.cs
- CopyOnWriteList.cs
- SmtpFailedRecipientException.cs