Ejemplo n.º 1
0
        // Execution
        public void Start(DataParams paramsValue)
        {
            _stack.PushWindow(0, null, Locator);
            try
            {
                _serverProcess.PushExecutingProgram(this);
                try
                {
                    _localParams = new DataParams();
                    DataParams localParamsValue = new DataParams();
                    if (_shouldPushLocals)
                    {
                        foreach (DataParam param in _serverProcess.ProcessLocals)
                        {
                            if (!ProcessLocals.Contains(param.Name))
                            {
                                _localParams.Add(param);
                                localParamsValue.Add(param);
                            }
                        }
                    }

                    if (paramsValue != null)
                    {
                        foreach (DataParam param in paramsValue)
                        {
                            localParamsValue.Add(param);
                        }
                    }

                    foreach (DataParam param in localParamsValue)
                    {
                        _stack.Push(param.Modifier == Modifier.In ? DataValue.CopyValue(ValueManager, param.Value) : param.Value);
                    }

                    // Set the BreakNext flag for the process if the debugger is set to Break On Start
                    ReportStart();
                }
                catch
                {
                    _serverProcess.PopExecutingProgram(this);
                    throw;
                }
            }
            catch
            {
                _stack.PopWindow();
                throw;
            }
        }