示例#1
0
        /// <summary>
        /// Runs the Sound Deck plugin asynchronously.
        /// </summary>
        /// <param name="args">The arguments supplied by the console or entry point.</param>
        /// <param name="provider">The service provider.</param>
        /// <returns>The task of running the Sound Deck.</returns>
        public static Task RunAsync(IServiceProvider provider)
        {
            AudioService = provider.GetRequiredService <IAudioService>();

            return(StreamDeckPlugin.Create()
                   .WithServiceProvider(provider)
                   .OnSetup(conn => conn.SystemDidWakeUp += Client_SystemDidWakeUp)
                   .RunAsync(CancellationToken.None));
        }
示例#2
0
 public PluginEventHandler(StreamDeckPlugin plugin, ClientArguments clientArguments)
 {
     _plugin         = plugin;
     _plugin.Context = clientArguments.UUID;
 }