コード例 #1
0
 public PhotoLogic(
     IPhotoService photoService,
     IOrchestratorService orchestratorService)
 {
     this.photoService        = photoService;
     this.orchestratorService = orchestratorService;
 }
コード例 #2
0
 public EchoBot(
     IOrchestratorService orchestratorService,
     T dialog
     )
 {
     _orchestratorService = orchestratorService;
     _dialog = dialog;
 }
コード例 #3
0
 public AlbumLogic(
     IAlbumService albumService,
     IPhotoService photoService, IOrchestratorService orchestratorService)
 {
     this.albumService        = albumService;
     this.photoService        = photoService;
     this.orchestratorService = orchestratorService;
 }
コード例 #4
0
 public Host(
     ICacheFactory cacheFactory,
     IMessagingFactory messagingFactory,
     IDatabaseFactory databaseFactory,
     IOrchestratorService orchestratorService,
     IMessagingService messagingService,
     IOptions <Messaging> messaging,
     ILogger <Host> logger)
 {
     _messaging           = messaging.Value ?? throw new ArgumentNullException(nameof(messaging));
     _logger              = logger ?? throw new ArgumentNullException(nameof(logger));
     _orchestratorService = orchestratorService ?? throw new ArgumentNullException(nameof(orchestratorService));
     _messagingService    = messagingService ?? throw new ArgumentNullException(nameof(messagingService));
     _messagingFactory    = messagingFactory ?? throw new ArgumentNullException(nameof(messagingFactory));
 }
コード例 #5
0
        public MappingsListViewModel(
            IFactoryService factoryService,
            ISettingsService settingsService,
            IMidiService midiService,
            IOrchestratorService orchestratorService,
            IDialogService dialogService)
        {
            if (factoryService == null)
            {
                throw new ArgumentNullException(nameof(factoryService));
            }
            if (settingsService == null)
            {
                throw new ArgumentNullException(nameof(settingsService));
            }
            if (midiService == null)
            {
                throw new ArgumentNullException(nameof(midiService));
            }
            if (dialogService == null)
            {
                throw new ArgumentNullException(nameof(dialogService));
            }
            if (orchestratorService == null)
            {
                throw new ArgumentNullException(nameof(orchestratorService));
            }

            _factoryService      = factoryService;
            _settingsService     = settingsService;
            _dialogService       = dialogService;
            _orchestratorService = orchestratorService;

            RouteCommand(MappingsCommand.Add, AddMapping);
            RouteCommand(MappingsCommand.Edit, EditMapping);
            RouteCommand(MappingsCommand.Delete, DeleteMapping);
            RouteCommand(MappingsCommand.MoveUp, () => MoveMapping(-1));
            RouteCommand(MappingsCommand.MoveDown, () => MoveMapping(1));
            RouteCommand(ToolBarCommand.Reset, ResetStates);

            LoadMappings();
            midiService.NoteEventReceived += MapMidiEvent;
        }
コード例 #6
0
ファイル: EmulatorViewModel.cs プロジェクト: chkr1011/LightPi
        public EmulatorViewModel(IOrchestratorService orchestratorService, ISettingsService settingsService)
        {
            if (orchestratorService == null)
            {
                throw new ArgumentNullException(nameof(orchestratorService));
            }

            _orchestratorService = orchestratorService;

            SetupFramesPerSecondMonitor();

            orchestratorService.ChangesCommitted += ApplyState;

            foreach (var output in settingsService.OutputViewModels)
            {
                output.StateChanged += UpdateOutputState;
                Outputs.Add(output);
            }
        }
コード例 #7
0
 /// <nodoc/>
 internal GrpcOrchestratorServer(LoggingContext loggingContext, IOrchestratorService orchestratorService, DistributedInvocationId invocationId)
     : base(loggingContext, invocationId)
 {
     m_grpcOrchestrator = new GrpcOrchestrator(orchestratorService);
 }
コード例 #8
0
        public MainWindowViewModel(
            IFactoryService factoryService,
            IDialogService dialogService,
            ISettingsService settingsService,
            IMidiService midiService,
            IOrchestratorService orchestratorService,
            ILogService logService,
            EmulatorViewModel emulatorViewModel,
            MappingsListViewModel mappingsViewModel,
            LogViewModel logViewModel)
        {
            if (factoryService == null)
            {
                throw new ArgumentNullException(nameof(factoryService));
            }
            if (settingsService == null)
            {
                throw new ArgumentNullException(nameof(settingsService));
            }
            if (midiService == null)
            {
                throw new ArgumentNullException(nameof(midiService));
            }
            if (orchestratorService == null)
            {
                throw new ArgumentNullException(nameof(orchestratorService));
            }
            if (logService == null)
            {
                throw new ArgumentNullException(nameof(logService));
            }
            if (mappingsViewModel == null)
            {
                throw new ArgumentNullException(nameof(mappingsViewModel));
            }
            if (logViewModel == null)
            {
                throw new ArgumentNullException(nameof(logViewModel));
            }

            _factoryService      = factoryService;
            _dialogService       = dialogService;
            _settingsService     = settingsService;
            _midiService         = midiService;
            _orchestratorService = orchestratorService;
            _logService          = logService;

            Mappings = mappingsViewModel;
            Emulator = emulatorViewModel;
            Log      = logViewModel;

            RouteCommand(ToolBarCommand.Settings, ChangeSettings);
            RouteCommand(ToolBarCommand.Outputs, ChangeOutputs);

            Initialize();

            _dialogService.DialogShown  += (s, e) => HasDialog = true;
            _dialogService.DialogClosed += (s, e) => HasDialog = false;

            var version = Assembly.GetEntryAssembly().GetName().Version;

            Title = $"MIDI 2 Orchestrator Bridge v{version} - LightPi (c) Christian Kratky 2016";
        }
コード例 #9
0
 internal GrpcOrchestrator(IOrchestratorService service)
 {
     m_orchestratorService = service;
 }
コード例 #10
0
 internal GrpcOrchestratorServer(LoggingContext loggingContext, IOrchestratorService orchestratorService, DistributedBuildId buildId)
 {
     m_loggingContext      = loggingContext;
     m_orchestratorService = orchestratorService;
     m_buildId             = buildId;
 }