Beispiel #1
0
 public override DbgEvaluationResult Evaluate(DbgEvaluationInfo evalInfo, string expression, DbgEvaluationOptions options, object state)
 {
     if (evalInfo == null)
     {
         throw new ArgumentNullException(nameof(evalInfo));
     }
     if (!(evalInfo.Context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (evalInfo.Context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (expression == null)
     {
         throw new ArgumentNullException(nameof(expression));
     }
     Debug.Assert((evalInfo.Context.Options & DbgEvaluationContextOptions.NoMethodBody) == 0, "Missing method debug info");
     return(CreateResult(evalInfo.Context.Runtime, engineExpressionEvaluator.Evaluate(evalInfo, expression, options, state)));
 }
Beispiel #2
0
 public override DbgEvaluationResult Evaluate(DbgEvaluationContext context, DbgStackFrame frame, string expression, DbgEvaluationOptions options, object state, CancellationToken cancellationToken)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     if (!(context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (expression == null)
     {
         throw new ArgumentNullException(nameof(expression));
     }
     Debug.Assert((context.Options & DbgEvaluationContextOptions.NoMethodBody) == 0, "Missing method debug info");
     return(CreateResult(context.Runtime, engineExpressionEvaluator.Evaluate(context, frame, expression, options, state, cancellationToken)));
 }
Beispiel #3
0
 public override DbgEvaluationResult Evaluate(DbgEvaluationContext context, DbgStackFrame frame, string expression, DbgEvaluationOptions options, CancellationToken cancellationToken)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     if (!(context is DbgEvaluationContextImpl))
     {
         throw new ArgumentException();
     }
     if (context.Language != Language)
     {
         throw new ArgumentException();
     }
     if (context.Runtime.RuntimeKindGuid != runtimeKindGuid)
     {
         throw new ArgumentException();
     }
     if (expression == null)
     {
         throw new ArgumentNullException(nameof(expression));
     }
     return(CreateResult(engineExpressionEvaluator.Evaluate(context, frame, expression, options, cancellationToken)));
 }