C# Class PowerStudio.DebugEngine.DebugExpression

When a program has halted, the session debug manager (SDM) obtains a stack frame from the DE with a call to IDebugThread2::EnumFrameInfo. The SDM then calls IDebugStackFrame2::GetExpressionContext to get the IDebugExpressionContext2 interface. This is followed by a call to IDebugExpressionContext2::ParseText to create the IDebugExpression2 interface, which represents the parsed expression ready to be evaluated. The SDM calls either IDebugExpression2::EvaluateSync or IDebugExpression2::EvaluateAsync to actually evaluate the expression and produce a value. In an implementation of IDebugExpressionContext2::ParseText, the DE uses COM's CoCreateInstance function to instantiate an expression evaluator and get an IDebugExpressionEvaluator interface (see the Example in the IDebugExpressionEvaluator interface). The DE then calls IDebugExpressionEvaluator::Parse to obtain an IDebugParsedExpression interface. This interface is used in the implementation of IDebugExpression2::EvaluateSync and IDebugExpression2::EvaluateAsync to perform the evaluation.
Inheritance: IDebugExpression2
Mostrar archivo Open project: IntelliTect/PowerStudio

Public Methods

Method Description
Abort ( ) : int

This method cancels asynchronous expression evaluation as started by a call to the IDebugExpression2::EvaluateAsync method.

When asynchronous expression evaluation is cancelled, do not sent an IDebugExpressionEvaluationCompleteEvent2 event to the event callback passed to the IDebugProgram2::Attach or IDebugEngine2::Attach methods.

EvaluateAsync ( enum_EVALFLAGS dwFlags, IDebugEventCallback2 pExprCallback ) : int

This method evaluates the expression asynchronously.

This method should return immediately after it has started the expression evaluation. When the expression is successfully evaluated, an IDebugExpressionEvaluationCompleteEvent2 must be sent to the IDebugEventCallback2 event callback as supplied through IDebugProgram2::Attach or IDebugEngine2::Attach.

EvaluateSync ( enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, IDebugProperty2 &ppResult ) : int

This method evaluates the expression synchronously.

For synchronous evaluation, it is not necessary to send an event back to Visual Studio upon completion of the evaluation.

Method Details

Abort() public method

This method cancels asynchronous expression evaluation as started by a call to the IDebugExpression2::EvaluateAsync method.
When asynchronous expression evaluation is cancelled, do not sent an IDebugExpressionEvaluationCompleteEvent2 event to the event callback passed to the IDebugProgram2::Attach or IDebugEngine2::Attach methods.
public Abort ( ) : int
return int

EvaluateAsync() public method

This method evaluates the expression asynchronously.
This method should return immediately after it has started the expression evaluation. When the expression is successfully evaluated, an IDebugExpressionEvaluationCompleteEvent2 must be sent to the IDebugEventCallback2 event callback as supplied through IDebugProgram2::Attach or IDebugEngine2::Attach.
public EvaluateAsync ( enum_EVALFLAGS dwFlags, IDebugEventCallback2 pExprCallback ) : int
dwFlags enum_EVALFLAGS A combination of flags from the EVALFLAGS enumeration that control expression evaluation.
pExprCallback IDebugEventCallback2 This parameter is always a null value.
return int

EvaluateSync() public method

This method evaluates the expression synchronously.
For synchronous evaluation, it is not necessary to send an event back to Visual Studio upon completion of the evaluation.
public EvaluateSync ( enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, IDebugProperty2 &ppResult ) : int
dwFlags enum_EVALFLAGS A combination of flags from the EVALFLAGS enumeration that control expression evaluation.
dwTimeout uint Maximum time, in milliseconds, to wait before returning from this method. Use INFINITE to wait indefinitely.
pExprCallback IDebugEventCallback2 This parameter is always a null value.
ppResult IDebugProperty2 Returns the IDebugProperty2 object that contains the result of the expression evaluation.
return int