DkmVisualizedExpression Class

Definition

Dispatcher object used for custom visualization through a concord EE addin.

Derived classes: DkmChildVisualizedExpression, DkmRootVisualizedExpression

public ref class DkmVisualizedExpression abstract : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("2db1132d-77a6-ae00-a7f7-b2c910327b56")]
public abstract class DkmVisualizedExpression : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("2db1132d-77a6-ae00-a7f7-b2c910327b56")>]
type DkmVisualizedExpression = class
    inherit DkmDataContainer
    interface IDisposable
Public MustInherit Class DkmVisualizedExpression
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmVisualizedExpression
Derived
Attributes
Implements

Properties

InspectionContext

Options and target context to use while performing the inspection operation.

InspectionSession

The InspectionSession allows the various components which examine data in the target process to store private data with the same lifetime. Inspection sessions are closed when the user attempts to continue the process.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
RuntimeInstance

Indicates which runtime monitor will be used to perform this evaluation.

SourceId

Guid which ties together the expression evaluator that created this object and the object itself. Generally used by expression evaluators to filter their implementation of IDkmCustomVisualizerCallback to only DkmVisualizedExpression they created.

StackFrame

Stack frame the expression is being evaluated in expression in.

TagValue

DkmVisualizedExpression is an abstract base class. This enum indicates which derived class this object is an instance of.

UniqueId

Guid which uniquely identifies this instance.

ValueHome

[Optional] The location at which the value is stored, which can be modified to edit the value. This should be null for read-only values, such as integer constants.

VisualizerId

Guid which ties together the addin and the expressions that call that addin. The addin should use the Guid provided in the native visualizer file as a filter.

Methods

Close()

Closes a DkmVisualizedExpression object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmVisualizedExpression objects are automatically closed when their associated DkmInspectionSession object is closed.

CreateDefaultChildFullName(Int32)

This method will construct a default full name for a custom visualized child expression. This name will be the root expression's full name and an expand format string that will cause the expression evaluator to callback to the visualizer to obtain children. The DkmVisualizedExpression instance this is called on should be the parent visualized expression for a child and the root visualized expression for a root.

EvaluateExpressionCallback(DkmInspectionContext, DkmLanguageExpression, DkmStackWalkFrame, DkmEvaluationResult)

This method allows a visualizer addin use the expression evaluator to compile and evaluate the default value for an expression. The addin can use this result as-is or override fields by creating a new result. The addin can also choose to use the expression evaluator for expansion using the the get children callbacks.

EvaluateVisualizedExpression(DkmEvaluationResult)

Evaluate a visualized expression returning a DkmEvaluationResult for it.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetChildren(Int32, DkmInspectionContext, DkmChildVisualizedExpression[], DkmEvaluationResultEnumContext)

Gets an enumeration context used to obtain the children of this evaluation result. This is used in all expression evaluation windows.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetChildrenCallback(DkmEvaluationResult, Int32, DkmInspectionContext, DkmEvaluationResult[], DkmEvaluationResultEnumContext)

This method allows a visualizer addin use the expression evaluator for expansion. The evaluation result contained within the visualized expression must have come from the expression evaluator via EvaluateExpressionCallback.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
GetItems(DkmEvaluationResultEnumContext, Int32, Int32, DkmChildVisualizedExpression[])

Called to obtain items from a instance of DkmEvaluationResultEnumContext created by an earlier call to GetChildren.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetItemsCallback(DkmEvaluationResultEnumContext, Int32, Int32, DkmEvaluationResult[])

This method allows a visualizer addin use the expression evaluator for expansion using the passed enumeration context. This is used to obtain local variables of a stack frame or child members from an evaluation result.

GetSymbolInterface(Guid, Object)

Allows custom expression evaluator addins to obtain the symbol interface for the type being visualized. This is not stored in the DkmVisualizedExpression directly to enable addins that live on the remote machine and do not depend on symbols.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetUnderlyingString()

This method is used for evaluation results that include DkmEvaluationResultFlags.RawString to obtain the the underlying string, with no enclosing quotes or escape sequences. This is method is invoked to display one of the various string visualizers in an expression evaluation window (click the magnifying glass icon).

Location constraint: API must be called from an IDE component (component level > 100,000).

GetUnderlyingStringCallback(DkmEvaluationResult)

This method is used for evaluation results that include DkmEvaluationResultFlags.RawString to obtain the the underlying string, with no enclosing quotes or escape sequences. This is method is invoked to display one of the various string visualizers in an expression evaluation window (click the magnifying glass icon).

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
SetValueAsString(String, Int32, String)

Modifies the value of the given evaluation result (assumed to be non-read-only) to match the given string. This is used after the user edits a value in any of the evaluation windows.

Location constraint: API must be called from an IDE component (component level > 100,000).

SetValueAsStringCallback(DkmEvaluationResult, String, Int32, String)

Modifies the value of the given evaluation result (assumed to be non-read-only) to match the given string. This is used after the user edits a value in any of the evaluation windows.

UseDefaultEvaluationBehavior(Boolean, DkmEvaluationResult)

Called by the expression evaluator when a visualized expression's children are being expanded, the the value is being set, or the underlying string is being obtained. If the visualizer addin wants complete control of the expression it should return false. It will then receive calls to GetChildren, GetItems, SetValueAsString, and GetUnderlyingString. If the visualizer addin wants to completely defer these operations to the expression evaluator, it should return true. It must also give the expression evaluator back the instance of DkmEvaluationResult that came from the EE via one of the IDkmCustomVisualizerCallback methods. Note that the addin MUST have obtained the default DkmEvaluationResult from the EE if it wants the EE to control the object. Returning true from this method is primarily used by visualizer addins that just tweak something small like the view of a value but don't want to modify expansion or setting values.

Location constraint: API must be called from an IDE component (component level > 100,000).

Explicit Interface Implementations

IDisposable.Dispose()

Applies to