Exemple #1
0
        public long AddRuntimeObject(string objectType, int sessionId, params object[] param)
        {
            RuntimeObject runtimeObject = null;

            switch (objectType)
            {
            case Constants.BreakPointObjectName:
                runtimeObject = new BreakPointObject((CallStack)param[0]);
                break;

            case Constants.WatchDataObjectName:
                runtimeObject = new WatchDataObject(sessionId, (int)param[0],
                                                    (string)param[1]);
                break;

            case Constants.EvaluationObjectName:
                runtimeObject = new EvaluationObject(sessionId, (int)param[0],
                                                     (string)param[1]);
                break;

            default:
                _globalInfo.LogService.Print(LogLevel.Warn, CommonConst.PlatformLogSession,
                                             $"Unsupported runtime object type: {0}.");
                _globalInfo.ExceptionManager.Append(new TestflowDataException(
                                                        ModuleErrorCode.InvalidRuntimeObjectType,
                                                        _globalInfo.I18N.GetFStr("InvalidRuntimeObjType", objectType)));
                return(Constants.InvalidObjectId);

                break;
            }
            AddObject(runtimeObject);
            return(runtimeObject.Id);
        }
Exemple #2
0
        private void EvaluateExpression(EvaluationObject evaluationObject)
        {
            DebugMessage debugMessage = new DebugMessage(MessageNames.RequestValueName, evaluationObject.Session, false);

            debugMessage.WatchData = new DebugWatchData();
            debugMessage.WatchData.Names.Add(evaluationObject.Expression);
            _globalInfo.MessageTransceiver.Send(debugMessage);
        }