(string[] args)
| 11 | class Program |
| 12 | { |
| 13 | static void Main(string[] args) |
| 14 | { |
| 15 | var currentPath = AppDomain.CurrentDomain.BaseDirectory; |
| 16 | var dap = new DAPStream(); |
| 17 | FileStream logFile = null; |
| 18 | |
| 19 | try |
| 20 | { |
| 21 | logFile = new FileStream(currentPath + "\\DAP.log", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); |
| 22 | dap.EnableLogging(logFile); |
| 23 | |
| 24 | var dapHandler = new DAPMessageHandler(dap); |
| 25 | dapHandler.EnableLogging(logFile); |
| 26 | dap.RunLoop(); |
| 27 | } |
| 28 | catch (Exception e) |
| 29 | { |
| 30 | dap.SendEvent("output", new DAPOutputMessage |
| 31 | { |
| 32 | category = "important", |
| 33 | output = e.ToString() |
| 34 | }); |
| 35 | dap.SendErrorReply(1, "initialize", "Internal error during initialization:\r\n" + e.ToString()); |
| 36 | |
| 37 | if (logFile != null) |
| 38 | { |
| 39 | using (var writer = new StreamWriter(logFile, Encoding.UTF8, 0x1000, true)) |
| 40 | { |
| 41 | writer.Write(e.ToString()); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | } |
nothing calls this directly
no test coverage detected