Beispiel #1
0
        private void AddWatchVariable(int session, WatchDataObject watchDataObj)
        {
            string watchDataName = ModuleUtils.GetRuntimeVariableString(watchDataObj, _sequenceData);

            if (!_watchVariables.ContainsKey(session))
            {
                _watchVariables.Add(session, new List <string>(Constants.DefaultRuntimeSize));
            }
            if (!_watchVariables[session].Contains(watchDataName))
            {
                _watchVariables[session].Add(watchDataName);
            }
            RuntimeState runtimeState = _globalInfo.StateMachine.State;

            if (runtimeState == RuntimeState.Running || runtimeState == RuntimeState.Blocked ||
                runtimeState == RuntimeState.DebugBlocked)
            {
                SendRefreshWatchMessage(session);
            }
        }
Beispiel #2
0
        private void RemoveWatchVariable(int session, WatchDataObject watchDataObj)
        {
            string watchDataName = ModuleUtils.GetRuntimeVariableString(watchDataObj, _sequenceData);

            if (!_watchVariables.ContainsKey(session))
            {
                return;
            }
            if (_watchVariables[session].Contains(watchDataName))
            {
                _watchVariables[session].Remove(watchDataName);
                if (0 == _watchVariables[session].Count)
                {
                    _watchVariables.Remove(session);
                }
            }
            RuntimeState runtimeState = _globalInfo.StateMachine.State;

            if (runtimeState == RuntimeState.Running || runtimeState == RuntimeState.Blocked ||
                runtimeState == RuntimeState.DebugBlocked)
            {
                SendRefreshWatchMessage(session);
            }
        }