Exemplo n.º 1
0
        public MainModel(RootModel root,
                         MainTargetsModel targets,
                         MainSettingsModel settings,
                         SourcesModel sources,
                         StreamSettingsModel streamSettings,
                         MainStreamerModel streamer,
                         MainIndicatorsModel indicators,
                         MainVpnModel vpn,
                         MainAboutModel about,
                         AudioModel audio,
                         HubConnectionService hubConnectionService,
                         IWindowStateManager windowStateManager,
                         IAppEnvironment environment,
                         CoreData coreData,
                         StateLoggerService stateLoggerService,
                         LocalSettingsService localSettingsService,
                         IUpdateManager updateManager,
                         TransientMessageModel transientMessageModel,
                         IAppResources appResources,
                         SceneEditingModel sceneEditingModel,
                         ResourceService resourceService)
        {
            Root                  = root;
            Targets               = targets;
            Settings              = settings;
            Sources               = sources;
            StreamSettings        = streamSettings;
            Streamer              = streamer;
            Indicators            = indicators;
            Vpn                   = vpn;
            About                 = about;
            Audio                 = audio;
            _hubConnectionService = hubConnectionService;
            _windowStateManager   = windowStateManager;
            _environment          = environment;
            _coreData             = coreData;
            _stateLoggerService   = stateLoggerService;
            _localSettingsService = localSettingsService;
            _updateManager        = updateManager;
            TransientMessage      = transientMessageModel;
            _appResources         = appResources;
            SceneEditing          = sceneEditingModel;
            _resourceService      = resourceService;
            _serverClient         = new ModelClient {
                Filter = new FilterConfigurator(true).Build()
            };
            _coreData.GetManager().Register(_serverClient);
            _serverClient.SerializeAndClearChanges();

            _coreData.Subscriptions.OnChangeForSubscriptions = async() => await ProcessLocalOrRemoteChange();

            _coreData.Subscriptions.OnLocalChange = async() => await ProcessLocalChange();
        }
Exemplo n.º 2
0
        public MainStreamerModel(CoreData coreData,
                                 ScreenRendererModel screenRenderer,
                                 SourcesModel sources,
                                 ResourceService resourceService,
                                 IAppEnvironment appEnvironment,
                                 IWindowStateManager windowStateManager,
                                 AudioModel audioModel,
                                 IAppResources appResource)
        {
            _coreData           = coreData;
            _sources            = sources;
            _resourceService    = resourceService;
            _appEnvironment     = appEnvironment;
            _windowStateManager = windowStateManager;
            _audioModel         = audioModel;
            _appResource        = appResource;
            ScreenRenderer      = screenRenderer;

            _healthCheck = new StreamerHealthCheck(coreData);

            Core.InitOnMain();
        }