예제 #1
0
        public override DbgEEAssignmentResult Assign(DbgEvaluationInfo evalInfo, string expression, string valueExpression, DbgEvaluationOptions options)
        {
            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));
            }
            if (valueExpression == null)
            {
                throw new ArgumentNullException(nameof(valueExpression));
            }
            var result = engineExpressionEvaluator.Assign(evalInfo, expression, valueExpression, options);

            return(CreateResult(result));
        }
예제 #2
0
        public override DbgEEAssignmentResult Assign(DbgEvaluationContext context, DbgStackFrame frame, string expression, string valueExpression, 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));
            }
            if (valueExpression == null)
            {
                throw new ArgumentNullException(nameof(valueExpression));
            }
            var result = engineExpressionEvaluator.Assign(context, frame, expression, valueExpression, options, cancellationToken);

            return(CreateResult(result));
        }