Udostępnij za pośrednictwem


Metoda Debugger2.GetExpression —

Wynikiem wyrażenia opartego na bieżącej klatce stosu.Jeśli wyrażenie można analizować, ale nie są oceniane, obiekt jest zwracany, ale nie zawiera prawidłowej wartości.

Przestrzeń nazw:  EnvDTE80
Zestaw:  EnvDTE80 (w EnvDTE80.dll)

Składnia

'Deklaracja
Function GetExpression ( _
    ExpressionText As String, _
    UseAutoExpandRules As Boolean, _
    Timeout As Integer _
) As Expression
Expression GetExpression(
    string ExpressionText,
    bool UseAutoExpandRules,
    int Timeout
)
Expression^ GetExpression(
    [InAttribute] String^ ExpressionText, 
    [InAttribute] bool UseAutoExpandRules, 
    [InAttribute] int Timeout
)
abstract GetExpression : 
        ExpressionText:string * 
        UseAutoExpandRules:bool * 
        Timeout:int -> Expression
function GetExpression(
    ExpressionText : String, 
    UseAutoExpandRules : boolean, 
    Timeout : int
) : Expression

Parametry

  • ExpressionText
    Typ: String
  • UseAutoExpandRules
    Typ: Boolean

    trueJeśli należy stosować zasady auto-expand; w przeciwnym razie false.

  • Timeout
    Typ: Int32

    Limit czasu w milisekundach.

Wartość zwracana

Typ: Expression
An Expression.

Uwagi

GetExpressionwynikiem wyrażenia opartego na bieżącej klatce stosu.Jeśli wyrażenie można analizować, ale nie są oceniane, zwracany jest obiekt, ale nie będzie zawierać prawidłową wartość.

Przykłady

Sub DisplayExpression(Optional ByVal str As String = "")
    Dim expr As Expression
    expr = DTE2.Debugger.GetExpression(str)

    If (expr.IsValidValue) Then
        MsgBox(expr.Name + " = " + expr.Value)
    Else
        MsgBox("Expression was not valid")
    End If
End Sub

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

Debugger2 Interfejs

Przestrzeń nazw EnvDTE80