Udostępnij za pośrednictwem


Metoda Debugger.GetExpression —

Wynikiem 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ść.

Przestrzeń nazw:  EnvDTE
Zestaw:  EnvDTE (w EnvDTE.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: System.String
    Tekst wyrażenia mają być poddane ocenie.
  • UseAutoExpandRules
    Typ: System.Boolean
    true Jeśli automatyczne rozwijanie należy stosować zasady; w przeciwnym razie false.

Wartość zwracana

Typ: EnvDTE.Expression
A Expression object.

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

Poniższy przykład demonstruje, jak należy użyć właściwości M:EnvDTE.Debugger.GetExpression(System.String,System.Boolean,System.Int32).

Sub DisplayExpression(Optional ByVal str As String = "")
    Dim expr As Expression
    expr = DTE.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

Debugger Interfejs

Przestrzeń nazw EnvDTE