public MessagingService(IHubContext <MessagingHub, IMessagingClient> messagingHub,
                                SubscriptionManager subscriptionManager,
                                VideoManager videoManager,
                                JobTrackerService jobTracker,
                                ApiModelFactory apiModelFactory)
        {
            this.messagingHub        = messagingHub;
            this.subscriptionManager = subscriptionManager;
            this.videoManager        = videoManager;
            this.jobTracker          = jobTracker;
            this.apiModelFactory     = apiModelFactory;

            this.subscriptionManager.SubscriptionCreated  += OnSubscriptionCreated;
            this.subscriptionManager.SubscriptionUpdated  += OnSubscriptionUpdated;
            this.subscriptionManager.SubscriptionsDeleted += OnSubscriptionsDeleted;
            this.subscriptionManager.FolderCreated        += OnFolderCreated;
            this.subscriptionManager.FolderUpdated        += OnFolderUpdated;
            this.subscriptionManager.FoldersDeleted       += OnFoldersDeleted;
            this.videoManager.VideoUpdated += OnVideoUpdated;
            this.jobTracker.JobScheduled   += OnJobScheduled;
            this.jobTracker.JobStarted     += OnJobStarted;
            this.jobTracker.JobProgress    += OnJobProgress;
            this.jobTracker.JobCompleted   += OnJobCompleted;
            this.jobTracker.JobFailed      += OnJobFailed;
        }
Exemple #2
0
 public VideoManager(DataContext dataContext,
                     MessagingService messaging,
                     RegardScheduler scheduler,
                     IProviderManager providerManager,
                     ApiModelFactory modelFactory)
 {
     this.dataContext     = dataContext;
     this.messaging       = messaging;
     this.scheduler       = scheduler;
     this.providerManager = providerManager;
     this.modelFactory    = modelFactory;
 }
 public SubscriptionManager(DataContext dataContext,
                            IOptionManager optionManager,
                            IProviderManager providerManager,
                            MessagingService messaging,
                            RegardScheduler scheduler,
                            IVideoStorageService videoStorageService,
                            ApiModelFactory apiModelFactory)
 {
     this.dataContext         = dataContext;
     this.optionManager       = optionManager;
     this.providerManager     = providerManager;
     this.messaging           = messaging;
     this.scheduler           = scheduler;
     this.videoStorageService = videoStorageService;
     this.apiModelFactory     = apiModelFactory;
 }