Пример #1
0
        public override void Execute(object[] arguments)
        {
            if (arguments.Length != 3)
            {
                throw new ArgumentOutOfRangeException("arguments");
            }

            var debugger = arguments[0] as IDebuggerManager;
            var stackFrame = arguments[1] as NodeStackFrame;
            var expression = arguments[2] as string;

            if (debugger == null)
            {
                string message = string.Format("Invalid arguments: {0}", arguments);
                throw new ArgumentException(message, "arguments");
            }

            var variableProvider = new EvaluateVariableProvider(_message, debugger, stackFrame, expression);
            Result = NodeMessageFactory.CreateVariable(variableProvider);
        }
Пример #2
0
        public override void Execute(object[] arguments)
        {
            if (arguments.Length != 3)
            {
                throw new ArgumentOutOfRangeException("arguments");
            }

            var debugger   = arguments[0] as IDebuggerManager;
            var stackFrame = arguments[1] as NodeStackFrame;
            var expression = arguments[2] as string;

            if (debugger == null)
            {
                string message = string.Format("Invalid arguments: {0}", arguments);
                throw new ArgumentException(message, "arguments");
            }

            var variableProvider = new EvaluateVariableProvider(_message, debugger, stackFrame, expression);

            Result = NodeMessageFactory.CreateVariable(variableProvider);
        }