Exemple #1
0
        public DatabaseEnumerator(DebuggerClient dbgClient, DAPStream dap, StoryDebugInfo debugInfo, ValueFormatter formatter,
                                  EvaluationResultManager resultManager)
        {
            DebugInfo     = debugInfo;
            DAP           = dap;
            DbgClient     = dbgClient;
            Formatter     = formatter;
            ResultManager = resultManager;

            DbgClient.OnBeginDatabaseContents = this.OnBeginDatabaseContents;
            DbgClient.OnDatabaseRow           = this.OnDatabaseRow;
            DbgClient.OnEndDatabaseContents   = this.OnEndDatabaseContents;
        }
        public ExpressionEvaluator(StoryDebugInfo debugInfo, DAPStream dap, DebuggerClient dbgClient, ValueFormatter formatter,
                                   EvaluationResultManager results)
        {
            DebugInfo      = debugInfo;
            DbgClient      = dbgClient;
            DAP            = dap;
            DatabaseDumper = new DatabaseEnumerator(dbgClient, dap, debugInfo, formatter, results);
            EvalResults    = results;

            DbgClient.OnEvaluateRow      = this.OnEvaluateRow;
            DbgClient.OnEvaluateFinished = this.OnEvaluateFinished;

            MakeFunctionNameMap();
        }
        static void Main(string[] args)
        {
            var currentPath = AppDomain.CurrentDomain.BaseDirectory;
            var logFile     = new FileStream(currentPath + "\\DAP.log", FileMode.Create);
            var dap         = new DAPStream();

            dap.EnableLogging(logFile);
            var dapHandler = new DAPMessageHandler(dap);

            dapHandler.EnableLogging(logFile);
            try
            {
                dap.RunLoop();
            }
            catch (Exception e)
            {
                using (var writer = new StreamWriter(logFile, Encoding.UTF8, 0x1000, true))
                {
                    writer.Write(e.ToString());
                    Console.WriteLine(e.ToString());
                }
            }
        }
Exemple #4
0
 public DAPMessageHandler(DAPStream stream)
 {
     Stream = stream;
     Stream.MessageReceived += this.MessageReceived;
 }