示例#1
0
            public string CompileResults; // like err msg

            public CompileHelper(string pathFileToExecute, ILogger logger, ITakeSample itakeSample, CancellationToken token)
            {
                this.pathFileToExecute = pathFileToExecute;
                this.itakeSample       = itakeSample;
                this.token             = token;
                this._logger           = logger;
            }
示例#2
0
        public MyCodeBaseClass(object[] args)
        {
            _FileToExecute = args[0] as string;
            _logger        = args[1] as ILogger;
            _CancellationTokenExecuteCode = (CancellationToken)args[2]; // value type
            _itakeSample = args[3] as ITakeSample;
            _dte         = args[4] as EnvDTE.DTE;
            _package     = args[5] as object;// IAsyncPackage;
            //logger.LogMessage("Registering events ");

            _perfGraphToolWindowControl = _itakeSample as PerfGraphToolWindowControl;
        }
示例#3
0
        public CompileHelper CompileTheCode(
            ITakeSample itakeSample, // pass this to executing code, which may not reference WPF asms
            string pathFileToExecute,
            CancellationToken token)
        {
            var compilerHelper = new CompileHelper(pathFileToExecute, _logger, itakeSample, token);

            try
            {
                compilerHelper.CompileTheCode();
            }
            catch (Exception ex)
            {
                compilerHelper.CompileResults = ex.ToString();
            }
            return(compilerHelper);
        }