Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="messageProcessor">Message Processor Object</param>
        public PluginService(IHostApplicationLifetime hostApplicationLifetime, ILogger <PluginService> logger,
                             ITouchPortalClientFactory clientFactory, ISimConnectService simConnectService, IReflectionService reflectionService)
        {
            _hostApplicationLifetime = hostApplicationLifetime ?? throw new ArgumentNullException(nameof(hostApplicationLifetime));
            _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
            _simConnectService = simConnectService ?? throw new ArgumentNullException(nameof(simConnectService));
            _reflectionService = reflectionService ?? throw new ArgumentNullException(nameof(reflectionService));

            _client = clientFactory?.Create(this) ?? throw new ArgumentNullException(nameof(clientFactory));
        }
        public AudioMonitorPlugin(ILogger <AudioMonitorPlugin> logger,
                                  ITouchPortalClientFactory clientFactory,
                                  WindowsMultimediaDeviceFactory windowsMultimediaDeviceFactory,
                                  BarMeterGraphics barMeterGraphics)
        {
            _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
            _barMeterGraphics = barMeterGraphics ?? throw new ArgumentNullException(nameof(barMeterGraphics));

            _client = clientFactory.Create(this);
            _windowsMultimediaDevice = windowsMultimediaDeviceFactory.Create(this);
        }
        public GoXLRPlugin(ITouchPortalClientFactory clientFactory,
                           GoXLRServer goXLRServer,
                           ILogger <GoXLRPlugin> logger)
        {
            //Set the event handler for TouchPortal:
            _client = clientFactory.Create(this);
            //Set the event handler for GoXLR connected:
            _server         = goXLRServer;
            _logger         = logger;
            _localAddresses = GetLocalAddresses();

            //Set the event handler for GoXLR Clients connected:
            _server.UpdateConnectedClientsEvent = UpdateClientState;
        }
Пример #4
0
 public SamplePlugin(ITouchPortalClientFactory clientFactory,
                     ILogger <SamplePlugin> logger)
 {
     _logger = logger;
     _client = clientFactory.Create(this);
 }