コード例 #1
0
        public TranscriptionService(ITransactionService transactionService,
                                    IMapper mapper,
                                    IUsersRepository usersRepository,
                                    IImportRepository importsRepository,
                                    IWorkingPeriodsService workingPeriodsService,
                                    ITranscriptionRepository transcriptionRepository,
                                    ILabelingModuleConfiguration labelingModuleConfiguration,
                                    IAudioReopenSubscriptionService audioReopenSubscriptionService,
                                    IDeepSpeechControlProxy deepSpeechControlProxy,
                                    IAssignedLabelGroupsRepository assignedLabelGroupsRepository,
                                    ILabelingAudioService labelingAudioService,
                                    ILabelService labelService,
                                    ITranscriptionLabelsRepository transcriptionLabelsRepository,
                                    ITranscriptionMetricsRepository transcriptionMetricsRepository,
                                    ITranscriptionSelectedLabelRepository transcriptionSelectedLabelRepository)
        {
            this.mapper                               = mapper;
            this.transactionService                   = transactionService;
            this.usersRepository                      = usersRepository;
            this.workingPeriodsService                = workingPeriodsService;
            this.importsRepository                    = importsRepository;
            this.deepSpeechControlProxy               = deepSpeechControlProxy;
            this.labelingModuleConfiguration          = labelingModuleConfiguration;
            this.audioReopenSubscriptionService       = audioReopenSubscriptionService;
            this.transcriptionRepository              = transcriptionRepository;
            this.assignedLabelGroupsRepository        = assignedLabelGroupsRepository;
            this.labelingAudioService                 = labelingAudioService;
            this.labelService                         = labelService;
            this.transcriptionLabelsRepository        = transcriptionLabelsRepository;
            this.transcriptionMetricsRepository       = transcriptionMetricsRepository;
            this.transcriptionSelectedLabelRepository = transcriptionSelectedLabelRepository;

            randomizer = new Random();
        }
コード例 #2
0
        public AudioReopenSubscriptionService(ILabelingModuleConfiguration labelingModuleConfiguration,
                                              IKeepAliveConfiguration keepAliveConfiguration,
                                              ILogger <AudioReopenSubscriptionService> logger,
                                              ILifetimeScopeExecutor lifetimeScopeExecutor)
        {
            this.logger = logger;
            this.lifetimeScopeExecutor = lifetimeScopeExecutor;

            var cacheOptions = new SlidingExpirationCacheOptions <KeyValuePair <long, LabelingType>, long>()
            {
                ExpirationAsyncCallback = SubscriptionExpirationCallback,
                ExpirationScanFrequency = labelingModuleConfiguration.AudioReopen.ExpirationScanFrequency,
                RefreshFrequency        = keepAliveConfiguration.Server.CacheRefreshFrequency,
                EntrySlidingExpiration  = labelingModuleConfiguration.AudioReopen.AudioSlidingExpiration
            };

            subscribers = new SlidingExpirationCache <KeyValuePair <long, LabelingType>, long>(logger, cacheOptions);
        }
コード例 #3
0
 public FCMomentsService(IMapper mapper,
                         ITransactionService transactionService,
                         IUsersRepository usersRepository,
                         ILabelingModuleConfiguration labelingModuleConfiguration,
                         IWorkingPeriodsService workingPeriodsService,
                         IFCMomentsRepository fcMomentsRepository,
                         IAudioReopenSubscriptionService audioReopenSubscriptionService,
                         ILabelingAudioService labelingAudioService,
                         IFCMomentAMLogRepository fcMomentAMLogRepository)
 {
     this.mapper                         = mapper;
     this.usersRepository                = usersRepository;
     this.transactionService             = transactionService;
     this.workingPeriodsService          = workingPeriodsService;
     this.labelingModuleConfiguration    = labelingModuleConfiguration;
     this.audioReopenSubscriptionService = audioReopenSubscriptionService;
     this.fcMomentsRepository            = fcMomentsRepository;
     this.labelingAudioService           = labelingAudioService;
     this.fcMomentAMLogRepository        = fcMomentAMLogRepository;
 }