示例#1
0
 public StreamDeckHost(IStreamDeckConnection streamDeckConnection, IStreamDeckConfiguration configuration, IServiceProvider serviceProvider, ILogger <StreamDeckHost> logger)
 {
     this.streamDeckConnection = streamDeckConnection;
     this.configuration        = configuration;
     this.serviceProvider      = serviceProvider;
     this.logger = logger;
 }
示例#2
0
        public Task Disconnect()
        {
            // kill emulator process too here
            var con = connection;

            connection = null;
            return(con?.Disconnect() ?? Task.CompletedTask);
        }
示例#3
0
        public StreamDeckPluginManager(IStreamDeckConnection streamDeckConnection)
        {
            this.streamDeckConnection = streamDeckConnection;

            streamDeckConnection.Listen <DidReceiveGlobalSettingsEvent>(s =>
            {
                this.CurrentSettings = s.Settings.Settings;
                return(Task.CompletedTask);
            });
        }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioBufferRestartService"/> class.
 /// </summary>
 /// <param name="connection">The connection to the Stream Deck.</param>
 /// <param name="audioService">The audio service.</param>
 public AudioBufferRestartService(IStreamDeckConnection connection, IAudioService audioService)
 {
     this.AudioService = audioService;
     this.Connection   = connection;
 }
示例#5
0
 public StreamDeckActionManagerProvider(IStreamDeckConnection connection, IServiceProvider serviceProvider, EventManager eventManager)
 {
     this.eventManager    = eventManager;;
     this.connection      = connection;
     this.serviceProvider = serviceProvider;
 }