Exemplo n.º 1
0
 public MessageAdapter(
     IMappingEngine mappingEngine,
     QueueUtilizerFactory queueUtilizerFactory,
     ImagePrinter imagePrinter,
     ImageService imageService,
     PatternViewModelProvider patternViewModelProvider,
      ImageUtils imageUtils)
 {
     _mappingEngine = mappingEngine;
     _queueUtilizer = queueUtilizerFactory.CreateQueue<InstagramMessageDto>();
     _imagePrinter = imagePrinter;
     _imageService = imageService;
     _patternVmProvider = patternViewModelProvider;
     _imageUtils = imageUtils;
 }
Exemplo n.º 2
0
        public MonitoringService(
            SettingsProvider settingsProvider,
            MessageAdapter messageAdapter,
            InstagramExplorer instagramExplorer,
            ImageUtils imageUtils,
            IImageRepository imageRep)
        {
            _messageAdapter = messageAdapter;
            _instagramExplorer = instagramExplorer;
            _imageUtils = imageUtils;
            _imageRep = imageRep;
            AppSettingsDto settings = settingsProvider.GetAppSettings();
            if (settings == null)
                throw new InvalidOperationException();

            _hashTag = settings.HashTag;
            var startSessionTime = imageRep.GetActiveSession(includeImages: false);
            if (startSessionTime == null)
                imageRep.StartSession();
            _startTime = startSessionTime?.StartTime ?? DateTime.Now;
            _endTime = settings.DateEnd;
            _printerName = settings.PrinterName;
        }
        public InstagramExplorerViewModel(
            IViewModelNavigator navigator,
            InstagramExplorer instagramExplorer,
            SettingsProvider settings,
            ImagePrinter printer, PatternViewModelProvider patternVMProvider,
            ImageUtils imageUtils, IMappingEngine mappingEngine)
        {
            _navigator = navigator;
            _printer = printer;
            _patternVmProvider = patternVMProvider;
            _imageUtils = imageUtils;
            _mappingEngine = mappingEngine;
            _instagramExplorer = instagramExplorer;
            AppSettingsDto appSettings = settings.GetAppSettings();
            if (appSettings != null)
                _printerName = appSettings.PrinterName;

            IsHashTag = true;
            SearchAsyncOperation= new NotifyTaskCompletion<ImageResponse>(Task.FromResult(default(ImageResponse)));
            _searchTokenSource= new CancellationTokenSource();
        }
 public CompositionModelProcessorFactory(ImageProcessor imageProcessor,ImageUtils imageUtils)
 {
     _imageProcessor = imageProcessor;
     _imageUtils = imageUtils;
 }
 public CompositionModelProcessorFactory(ImageProcessor imageProcessor, ImageUtils imageUtils)
 {
     _imageProcessor = imageProcessor;
     _imageUtils     = imageUtils;
 }