public ResultController(ClientServerContext context, IProcessingService processingService,
                         IFileService fileService)
 {
     _context           = context;
     _processingService = processingService;
     _fileService       = fileService;
 }
예제 #2
0
파일: Server.cs 프로젝트: seclerp/Socketize
 public Server(
     IProcessingService processingService,
     ILogger <Server> logger,
     ServerOptions options) : base(processingService, logger)
 {
     _options = options;
 }
예제 #3
0
 public AnimalService(IRepository <Animal> repository, IMapper mapper, IKeepingService keepingService,
                      IAttitudeToService attitudesToService, IDefectService defectService,
                      IProcessingService processingService, INeedsService needsService,
                      IVaccinationService vaccinationService, IIsNewService isNewService, IUriService uriService,
                      IAnimalLocationHistoryService locationHistoryService,
                      IStatisticService <Animal> statisticService, IAnimalViewLocationService locationService,
                      IFilterService <Animal, AnimalQuery> animalFilterService,
                      IDescriptionService descriptionService, IBreedService breedService)
 {
     _repository             = repository;
     _mapper                 = mapper;
     _keepingService         = keepingService;
     _attitudesToService     = attitudesToService;
     _defectService          = defectService;
     _processingService      = processingService;
     _needsService           = needsService;
     _isNewService           = isNewService;
     _vaccinationService     = vaccinationService;
     _uriService             = uriService;
     _locationHistoryService = locationHistoryService;
     _statisticService       = statisticService;
     _descriptionService     = descriptionService;
     _breedService           = breedService;
     _locationService        = locationService;
     _animalFilterService    = animalFilterService;
 }
예제 #4
0
        public TwitchService(
            IPreferencesService preferencesService,
            IProcessingService processingService,
            IRuntimeDataService runtimeDataService,
            IEventAggregator eventAggregator)
        {
            _preferencesService = preferencesService;
            _processingService  = processingService;
            _runtimeDataService = runtimeDataService;
            _eventAggregator    = eventAggregator;

            _videos = new ObservableCollection <TwitchVideo>();
            _videos.CollectionChanged += Videos_CollectionChanged;

            _downloads = new ObservableCollection <TwitchVideoDownload>();
            _downloads.CollectionChanged += Downloads_CollectionChanged;

            _downloadTasks = new ConcurrentDictionary <string, DownloadTask>();

            _appDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _changeDownloadLockObject = new object();

            _downloadTimer = new Timer(DownloadTimerCallback, null, 0, TIMER_INTERVALL);

            _eventAggregator.GetEvent <RemoveDownloadEvent>().Subscribe(Remove, ThreadOption.UIThread);
        }
예제 #5
0
파일: Client.cs 프로젝트: seclerp/Socketize
 public Client(
     IProcessingService processingService,
     ILogger <Client> logger,
     ClientOptions options) : base(processingService, logger)
 {
     _options = options;
 }
        public SaleBetStateMachine(IProcessingService processingService)
        {
            ProcessingService   = processingService;
            ReceiptProvider     = processingService?.BetReceiptProvider;
            JsonStateSerializer = new JsonStateSerializer <SaleBetStateMachine, SaleBetSaga>(this);

            BuildStateMachine();
        }
예제 #7
0
 public StreamSelectViewModel(IAppConfigService config, IShellViewModel shellViewModel,
                              IWindowManager windowManager, IProcessingService processing)
 {
     _shellViewModel    = shellViewModel;
     WindowManager      = windowManager;
     _configService     = config;
     _processingService = processing;
 }
 public PackageController(ClientServerContext context,
                          IHttpClientFactory clientFactory,
                          IProcessingService processingService)
 {
     _context           = context;
     _clientFactory     = clientFactory;
     _processingService = processingService;
 }
예제 #9
0
 public MainViewModel(IShellViewModel shellViewModel, IWindowManager windowManager, IAppConfigService config,
                      IProcessingService processingService)
 {
     _shellViewModel    = shellViewModel;
     WindowManager      = windowManager;
     _configService     = config;
     _processingService = processingService;
 }
예제 #10
0
 public void SetUp()
 {
     _mapper                         = Mapper.GetMapper;
     _configurationMock              = new Mock <IConfiguration>();
     _processingRepositoryMock       = new Mock <IRepository <Processing> >();
     _animalProcessingRepositoryMock = new Mock <IRepository <AnimalProcessing> >();
     _service                        = new ProcessingService(_processingRepositoryMock.Object, _animalProcessingRepositoryMock.Object, _mapper,
                                                             _configurationMock.Object);
 }
예제 #11
0
        public ShellViewModel(IAppConfigService config, IProcessingService processing)
        {
            _configService     = config;
            _processingService = processing;

            DisplayWindow(ShellWin.MainView);
            Title = "Video Convert";

            _configService.PropertyChanged += ConfigServiceOnPropertyChanged;
        }
예제 #12
0
        public void TwoServicesWithTheSecondValidAreProvided_TheSecondIsReturned()
        {
            var serviceMocks = GenerateServiceMocks(false, true);

            IValidServiceSelector validServiceSelector = new ValidServiceSelector(null);

            IProcessingService <string> validService = validServiceSelector.SelectValidService(serviceMocks, "", null);

            validService.Should().BeSameAs(serviceMocks[1]);
        }
예제 #13
0
        public void SingleInvalidServiceIsProvided_NullIsReturned()
        {
            var serviceMocks = GenerateServiceMocks(false);

            IValidServiceSelector validServiceSelector = new ValidServiceSelector(Substitute.For <ILogger <ValidServiceSelector> >());

            IProcessingService <string> validService = validServiceSelector.SelectValidService(serviceMocks, "", null);

            validService.Should().BeNull();
        }
예제 #14
0
        public void SingleValidServiceIsProvided_TheServiceIsReturned()
        {
            var serviceMocks = GenerateServiceMocks(true);

            IValidServiceSelector validServiceSelector = new ValidServiceSelector(null);

            IProcessingService <string> validService = validServiceSelector.SelectValidService(serviceMocks, "", null);

            validService.Should().BeSameAs(serviceMocks[0]);
        }
 protected Retriable(ILogger logger,
                     IMessengerService messengerService,
                     string functionName,
                     string path,
                     bool useAzureStorage,
                     IUserProfileProvider userProfileProvider,
                     IProcessingService processingService) : base(logger, messengerService, functionName, useAzureStorage, userProfileProvider, processingService)
 {
     _logger = logger;
     _path   = path;
 }
예제 #16
0
        /// <summary>
        /// Entry point to the threaded execute functionality
        /// </summary>
        private void _execute()
        {
            IProcessingService  service = Container.Resolve <IProcessingService>();
            ObjectJobDefinition d       = new ObjectJobDefinition(_source.Pipeline, _filesToInputs());
            JobRequest          r       = new JobRequest(d);

            r.Identifier = _source.Identifier;
            IJobTicket  t       = service.JobManager.EnqueueJob(r);
            IJobTracker tracker = Container.Resolve <IJobTracker>();

            tracker.Add(t, _source.Handler);
        }
예제 #17
0
        /// <summary>
        /// Sets this <see cref="IDIPS"/> into a running state.
        /// </summary>
        public void Start()
        {
            lock (this)
            {
                if (Initialized)
                {
                    return;
                }

                Processor = new ProcessingService();
            }
        }
예제 #18
0
        public void Setup()
        {
            _logger           = Substitute.For <ILogger>();
            _messengerService = Substitute.For <IMessengerService>();
            _messengerService
            .ServiceName
            .Returns("SmokeService");

            _userProfileProvider = Substitute.For <IUserProfileProvider>();
            _processingService   = Substitute.For <IProcessingService>();
            _processingService
            .Run(Arg.Any <Message>(), Arg.Do <Func <Task> >(_ => _?.Invoke()));
        }
예제 #19
0
        private static void Execute(string filename, string outputDirectory,
                                    CommandOption scheduleType)
        {
            IProcessingService processingService = ServiceProvider.GetService <IProcessingService>();

            processingService.BatchProcessed += new EventHandler <BatchProcessedEventArgs>(BatchProcessed);

            DateTime startTime   = DateTime.UtcNow;
            long     recordCount = processingService.Process(filename, outputDirectory,
                                                             1000, GetScheduleTypeValue(scheduleType), null);

            WriteComplete(GetRuntime(startTime), recordCount);
        }
 public SmokeFunction(ILogger logger,
                      IMessengerService messengerService,
                      bool isDevelopment,
                      IUserProfileProvider userProfileProvider,
                      IProcessingService processingService,
                      Func <Task> action = null) : base(logger,
                                                        messengerService,
                                                        FunctionName,
                                                        isDevelopment,
                                                        userProfileProvider,
                                                        processingService)
 {
     _action = action;
 }
예제 #21
0
 /// <inheritdoc />
 public AccountsController(
     IMapper mapper,
     UserManager <ApplicationUser> userManager,
     DbContext context,
     IApplicationUserService applicationUserService,
     IPostService postService,
     IProcessingService processingService) : base(mapper)
 {
     _userManager            = userManager;
     _applicationUserService = applicationUserService;
     _dbContext         = context;
     _postService       = postService;
     _processingService = processingService;
 }
예제 #22
0
 /// <inheritdoc />
 public PostsController(
     IPostService postService,
     ILikeService likeService,
     IEncryptionService encryptionService,
     IMapper mapper,
     ICachingService cachingService,
     IProcessingService processingService,
     DbContext context) : base(mapper)
 {
     _postService       = postService;
     _likeService       = likeService;
     _encryptionService = encryptionService;
     _context           = context;
     _cachingService    = cachingService;
     _processingService = processingService;
 }
예제 #23
0
        private void InternalStart()
        {
            var clock = this.createClock();
            var cache = new WeatherCache(clock);

            this.m_processor = new ProcessingService(this.m_config.ServiceName,
                                                     new SensorMappingRepository(this.m_config.DsmrProductConnectionString),
                                                     new DataPointRepository(this.m_config.DsmrOlapConnectionString),
                                                     new ProcessingHistoryRepository(this.m_config.DsmrOlapConnectionString, clock),
                                                     this.createDataClient(),
                                                     clock,
                                                     new WeatherService(cache, new OpenWeatherMapClient(), this.m_config));
            this.m_timers.Add(new DataReloadService(this.m_processor,
                                                    TimeSpan.Zero,
                                                    TimeSpan.FromSeconds(60)));
        }
예제 #24
0
 /// <inheritdoc />
 public CharactersController(
     ICharacterService characterService,
     ICharacterFacadeService characterFacadeService,
     IPostService postService,
     IProcessingService processingService,
     DbContext dbContext,
     ICachingService cachingService,
     ISuggestedEditService suggestedEditService,
     IMapper mapper) : base(mapper)
 {
     _characterService       = characterService;
     _dbContext              = dbContext;
     _cachingService         = cachingService;
     _postService            = postService;
     _processingService      = processingService;
     _characterFacadeService = characterFacadeService;
     _suggestedEditService   = suggestedEditService;
 }
예제 #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueProcessor"/> class.
        /// </summary>
        /// <param name="appConfig">
        /// Application configuration
        /// </param>
        /// <param name="processingService">
        /// Processing Service
        /// </param>
        /// <param name="ffmpegGetCrop">
        /// ffmpeg crop interface
        /// </param>
        /// <param name="ffmsIndex">
        /// ffmsindex interface
        /// </param>
        /// <param name="eac3To">
        /// eac3to interface
        /// </param>
        /// <param name="ffmpegDemuxer">
        /// ffmpeg demux interface
        /// </param>
        /// <param name="mplayerDemuxer">
        /// mplayer demux interface
        /// </param>
        /// <param name="mkvExtractSubtitle">
        /// mkvextract subtitle demux interface
        /// </param>
        /// <param name="demuxerTsMuxeR">
        /// tsMuxeR demux interface
        /// </param>
        /// <param name="bdSup2Sub">
        /// BDSup2Sub interface
        /// </param>
        /// <param name="ffmpegAc3">
        /// ffmpeg AC-3 encoder Interface
        /// </param>
        /// <param name="ffmpegDvd">
        /// ffmpeg DVD encoder Interface
        /// </param>
        /// <param name="lame">
        /// lame encoder Interface
        /// </param>
        /// <param name="neroAac">
        /// NeroAacEnc Interface
        /// </param>
        /// <param name="oggEnc">
        /// OggEnc Interface
        /// </param>
        /// <param name="x264">
        /// x264 encoder Interface
        /// </param>
        /// <param name="ffmpegX264">
        /// ffmpeg x264 encoder Interface
        /// </param>
        /// <param name="fileWorker">
        /// FileWorker Interface
        /// </param>
        /// <param name="dvdAuthor">
        /// DVDAuthor Interface
        /// </param>
        /// <param name="mkvMerge">
        /// mkvMerge Interface
        /// </param>
        /// <param name="mp4Box">
        /// mp4box Interface
        /// </param>
        /// <param name="mplex">
        /// Mplex Interface
        /// </param>
        /// <param name="spuMux">
        /// SpuMux Interface
        /// </param>
        /// <param name="tsMuxeR">
        /// tsMuxeR Interface
        /// </param>
        public QueueProcessor(IAppConfigService appConfig, IProcessingService processingService,
                              //decoder
                              IDecoderFfmpegGetCrop ffmpegGetCrop, IDecoderFfmsIndex ffmsIndex,
                              //demuxer
                              IDemuxerEac3To eac3To, IDemuxerFfmpeg ffmpegDemuxer,
                              IDemuxerMplayer mplayerDemuxer, IDemuxerMkvExtractSubtitle mkvExtractSubtitle,
                              IDemuxerTsMuxeR demuxerTsMuxeR,
                              //encoder
                              IEncoderBdSup2Sub bdSup2Sub, IEncoderFfmpegAc3 ffmpegAc3,
                              IEncoderFfmpegDvd ffmpegDvd, IEncoderLame lame, IEncoderNeroAac neroAac,
                              IEncoderOggEnc oggEnc, IEncoderX264 x264, IEncoderFfmpegX264 ffmpegX264,
                              //muxer
                              IFileWorker fileWorker, IMuxerDvdAuthor dvdAuthor, IMuxerMkvMerge mkvMerge,
                              IMuxerMp4Box mp4Box, IMuxerMplex mplex, IMuxerSpuMux spuMux, IMuxerTsMuxeR tsMuxeR)
        {
            _appConfig         = appConfig;
            _processingService = processingService;

            _ffmpegGetCrop = ffmpegGetCrop;
            _ffmsIndex     = ffmsIndex;

            _eac3To             = eac3To;
            _ffmpegDemuxer      = ffmpegDemuxer;
            _mplayerDemuxer     = mplayerDemuxer;
            _mkvExtractSubtitle = mkvExtractSubtitle;
            _demuxerTsMuxeR     = demuxerTsMuxeR;

            _bdSup2Sub  = bdSup2Sub;
            _ffmpegAc3  = ffmpegAc3;
            _ffmpegDvd  = ffmpegDvd;
            _lame       = lame;
            _neroAac    = neroAac;
            _oggEnc     = oggEnc;
            _x264       = x264;
            _ffmpegX264 = ffmpegX264;

            _fileWorker = fileWorker;
            _dvdAuthor  = dvdAuthor;
            _mkvMerge   = mkvMerge;
            _mp4Box     = mp4Box;
            _mplex      = mplex;
            _spuMux     = spuMux;
            _tsMuxeR    = tsMuxeR;
        }
예제 #26
0
        public ImageDisplayViewModel(IEventAggregator eventAggregator,
                                     IProcessingService processingService,
                                     IStartImageProcessingCommand startImageProcessingCommand,
                                     IStopImageProcessingCommand stopImageProcessingCommand,
                                     ISetOutputImageCommand setOutputImageCommand,
                                     IImageConverter imageConverter)
        {
            _processingService = processingService;

            StartImageProcessingCommand = startImageProcessingCommand;
            StopImageProcessingCommand  = stopImageProcessingCommand;
            SetOutputImageCommand       = setOutputImageCommand;

            StartImageProcessingCommand.OnProcessingStop = () => { OnPropertyChanged(string.Empty); };
            StopImageProcessingCommand.OnProcessingStop  = () => { OnPropertyChanged(string.Empty); };
            SetOutputImageCommand.OnImageUpdate          = SetOutputImage;

            eventAggregator.GetEvent <ShouldUpdateProcessingEngineEvent>().Subscribe(UpdateProcessingEngine);
        }
예제 #27
0
 /// <inheritdoc />
 public GamesController(
     IGameService gameService,
     IStageService stageService,
     ICharacterService characterService,
     ICachingService cachingService,
     IEncryptionService encryptionService,
     IPostService postService,
     IProcessingService processingService,
     IMapper mapper) : base(mapper)
 {
     _gameService       = gameService;
     _characterService  = characterService;
     _stageService      = stageService;
     _characterService  = characterService;
     _cachingService    = cachingService;
     _encryptionService = encryptionService;
     _postService       = postService;
     _processingService = processingService;
 }
예제 #28
0
        private void PopulateAvailableAlgorithms()
        {
            _AlgorithmBuilderViewModel.Container = GlobalContainer.Instance.Container;

            if (Container != null)
            {
                Service = Container.Resolve <IProcessingService>();

                if (Service != null)
                {
                    foreach (var algorithm in Service.PipelineManager.AvailableProcesses)
                    {
                        AlgorithmViewModel viewModel = new AlgorithmViewModel(algorithm);
                        viewModel.IsRemovable = false;
                        _AlgorithmBuilderViewModel.AvailableAlgorithms.Add(viewModel);
                    }
                }
            }
        }
        protected SmokeTest(ILogger logger,
                            IMessengerService messengerService,
                            string functionName,
                            bool useAzureStorage,
                            IUserProfileProvider userProfileProvider,
                            IProcessingService processingService)
        {
            Guard.ArgumentNotNull(logger, nameof(logger));
            Guard.ArgumentNotNull(messengerService, nameof(messengerService));
            Guard.ArgumentNotNull(processingService, nameof(processingService));
            Guard.IsNullOrWhiteSpace(functionName, nameof(functionName));

            _logger              = logger;
            _messengerService    = messengerService;
            _useAzureStorage     = useAzureStorage;
            _userProfileProvider = userProfileProvider;
            _processingService   = processingService;
            _functionName        = functionName;
        }
예제 #30
0
        public BetEditorViewModel(IDataService dataService, IAccountIdentService accountIdentService, IBetReceiptProvider receiptService, IProcessingService processingService, IUserMessageService userMessageService)
        {
            DataService         = dataService;
            AccountIdentService = accountIdentService;
            ReceiptService      = receiptService;
            ProcessingService   = processingService;
            UserMessageService  = userMessageService;

            Items    = new ObservableCollection <object>();
            Events   = new EventsViewModel(dataService, SelectedEventAction);
            Draws    = new SuperexpressDrawsViewModel(dataService, SelectedDrawAction);
            MadeBets = new MadeBetsViewModel(DataService, SelectedMadeBet);

            RemoveBetCommand             = new DelegateCommand <object>(RemoveBet);
            SwitchToExpressCommand       = new DelegateCommand <BaseBetViewModel>(SwitchToExpress);
            SwitchToSystemCommand        = new DelegateCommand <BaseBetViewModel>(SwitchToSystem, x => false);
            CreateExpressBetCommand      = new DelegateCommand(CreateNewExpressBet);
            CreateSuperexpressBetCommand = new DelegateCommand(CreateNewSuperexpressBet);

            this.OfInpc(x => x.PropertyChanged += SelfPropertyChanged);
        }