static async Task GetDiagnostics() { var log = await DriverDaemon.InvokeAsync(d => d.GetCurrentLog()); var diagnostics = new DiagnosticInfo(log); await Out.WriteLineAsync(diagnostics.ToString()); }
static async Task GetCurrentLog() { var log = await DriverDaemon.InvokeAsync(d => d.GetCurrentLog()); foreach (var message in log) { await Out.WriteLineAsync(Log.GetStringFormat(message)); } }
static async Task ListTypes <T>() { var types = from path in await DriverDaemon.InvokeAsync(d => d.GetChildTypes <T>()) select new PluginReference(path); foreach (var type in types) { var output = string.IsNullOrWhiteSpace(type.Name) ? type.Path : $"{type.Path} [{type.Name}]"; await Out.WriteLineAsync(output); } }
public async static void UnhandledException(object sender, Eto.UnhandledExceptionEventArgs e) { var appInfo = await DriverDaemon.InvokeAsync(d => d.GetApplicationInfo()); var exception = (Exception)e.ExceptionObject; await File.WriteAllLinesAsync(Path.Join(appInfo.AppDataDirectory, "ux.log"), new string[] { DateTime.Now.ToString(), exception.GetType().FullName, exception.Message, exception.Source, exception.StackTrace, exception.TargetSite.Name } ); }
static async Task Detect() { await DriverDaemon.InvokeAsync(d => d.DetectTablets()); }
static async Task SetInputHook(bool isHooked) { await DriverDaemon.InvokeAsync(d => d.SetInputHook(isHooked)); }
static async Task ApplySettings(Settings settings) { await DriverDaemon.InvokeAsync(d => d.SetSettings(settings)); }
static async Task <Settings> GetSettings() { return(await DriverDaemon.InvokeAsync(d => d.GetSettings())); }