private async Task OnExecuteAsync() { var cancellationTokenSource = new CancellationTokenSource(); var streamDeck = new StreamDeckClient(Port, PluginUuid, RegisterEvent, Info); streamDeck.KeyDownEventAsync += UpdateCounter; await streamDeck.RunAsync(cancellationTokenSource.Token); }
internal static async Task <(StreamDeckSoftwareEmulator emulator, StreamDeckClient client)> ConnectAsync(int port, string pluginUUID) { var emulator = new StreamDeckSoftwareEmulator(port, pluginUUID); string[] args = emulator.Start(); var sut = new StreamDeckClient(Assembly.GetExecutingAssembly(), args); sut.RunAsync(); await emulator.AwaitConnectionAsync(); return(emulator, sut); }
public static async Task Main(string[] args) { var client = new StreamDeckClient(args); await client.RunAsync(); }