public TouristReportLogic(ITravelStorage travelStorage, IExcursionStorage excursionStorage, IGuideStorage guideStorage, IReportStorage reportStorage)
 {
     this.travelStorage    = travelStorage;
     this.excursionStorage = excursionStorage;
     this.guideStorage     = guideStorage;
     this.reportStorage    = reportStorage;
 }
        public ReportBuilder(
            [NotNull] IReportGenerationPipelineManager reportGenerationPipelineManager,
            [NotNull] IReportFileStorage reportFileStorage,
            [NotNull] IReportStorage reportStorage,
            [NotNull] IReportTranslationManager reportTranslationManager,
            [NotNull] ITelemetryScopeProvider telemetryScopeProvider)
        {
            if (reportGenerationPipelineManager == null)
            {
                throw new ArgumentNullException(nameof(reportGenerationPipelineManager));
            }
            if (reportFileStorage == null)
            {
                throw new ArgumentNullException(nameof(reportFileStorage));
            }
            if (reportStorage == null)
            {
                throw new ArgumentNullException(nameof(reportStorage));
            }
            if (reportTranslationManager == null)
            {
                throw new ArgumentNullException(nameof(reportTranslationManager));
            }
            if (telemetryScopeProvider == null)
            {
                throw new ArgumentNullException(nameof(telemetryScopeProvider));
            }

            _reportGenerationPipelineManager = reportGenerationPipelineManager;
            _reportFileStorage        = reportFileStorage;
            _reportStorage            = reportStorage;
            _reportTranslationManager = reportTranslationManager;
            _telemetryScopeProvider   = telemetryScopeProvider;
        }
Esempio n. 3
0
 public OperatorReportLogic(IGuideStorage guideStorage, IExcursionStorage excursionStorage, ITourStorage tourStorage, ITravelStorage travelStorage, IReportStorage reportStorage)
 {
     _guideStorage      = guideStorage;
     _excursionStorage  = excursionStorage;
     _tourStorage       = tourStorage;
     _travelStorage     = travelStorage;
     this.reportStorage = reportStorage;
 }
Esempio n. 4
0
        public DeleteReportCommandHandler([NotNull] IReportStorage reportStorage)
        {
            if (reportStorage == null)
            {
                throw new ArgumentNullException(nameof(reportStorage));
            }

            _reportStorage = reportStorage;
        }
        public EditReportViewModel(IReportStorage reportStorage, ITaxonService taxonService)
        {
            _reportStorage = reportStorage;
            _taxonService  = taxonService;

            IsBusy = false;

            PropertyChanged += EditReportViewModel_PropertyChanged;
        }
        public EditReportViewModel(IReportStorage reportStorage, ITaxonService taxonService)
        {
            _reportStorage = reportStorage;
            _taxonService = taxonService;

            IsBusy = false;

            PropertyChanged += EditReportViewModel_PropertyChanged;
        }
Esempio n. 7
0
        public GetReportsListQueryHandler([NotNull] IReportStorage reportStorage)
        {
            if (reportStorage == null)
            {
                throw new ArgumentNullException(nameof(reportStorage));
            }

            _reportStorage = reportStorage;
        }
Esempio n. 8
0
        public ReportsViewModel(IReportStorage reportStorage, INotificationCenter notificationCenter)
        {
            _reportStorage = reportStorage;

            Title = "Mina rapporter";

            notificationCenter.Subscribe <User>(this, NotificationKeys.CurrentUserChanged, u =>
            {
                Device.BeginInvokeOnMainThread(RefreshReports);
            });
        }
Esempio n. 9
0
        public ReportsViewModel(IReportStorage reportStorage, INotificationCenter notificationCenter)
        {
            _reportStorage = reportStorage;

            Title = "Mina rapporter";

            notificationCenter.Subscribe<User>(this, NotificationKeys.CurrentUserChanged, u =>
            {
                Device.BeginInvokeOnMainThread(RefreshReports);
            });
        }
Esempio n. 10
0
        public UpdateController(ILocalConfiguration config, IHttpClient httpClient, IUpdateClient updateClient,
                                ITaskHandler taskHandler, IStatusReporter reporter, IReportStorage reportStorage, ITimeFrameDecision timeFrameDecision)
        {
            mStopServiceEvent = new ManualResetEvent(false);

            LocalConfig         = config;
            WebHttpClient       = httpClient;
            WindowsUpdateClient = updateClient;
            WindowsTaskHandler  = taskHandler;
            Reporter            = reporter;
            ReportStorage       = reportStorage;
            TimeFrameDecision   = timeFrameDecision;

            Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        }
        public DataStatisticStorage(
            IDataRepository statisticStorage,
            IGlobalServerStatisticStorage globalStatisticStorage,
            IServerStatisticStorage serverStatisticStorage,
            IPlayerStatisticStorage playerStatisticStorage,
            IReportStorage reportStorage)
        {
            logger.Info("Initialize full statistic storage");

            this.statisticStorage       = statisticStorage;
            this.globalStatisticStorage = globalStatisticStorage;
            this.serverStatisticStorage = serverStatisticStorage;
            this.playerStatisticStorage = playerStatisticStorage;
            this.reportStorage          = reportStorage;
            InitStatisticsProviders();
        }
Esempio n. 12
0
 public virtual void Setup()
 {
     GlobalStatisticStorage = new GlobalServerStatisticStorage();
     ServerStatisticStorage = new ServerStatisticStorage(GlobalStatisticStorage);
     PlayerStatisticStorage = new PlayerStatisticStorage();
     ReportStorage          = new ReportStorage(ServerStatisticStorage, PlayerStatisticStorage);
     DocumentStore          = RavenDbStore.GetStore(new ApplicationOptions
     {
         InMemory    = true,
         UnitTesting = true
     });
     DataRepository   = new RavenDbStorage(DocumentStore);
     StatisticStorage = new DataStatisticStorage(
         DataRepository,
         GlobalStatisticStorage,
         ServerStatisticStorage,
         PlayerStatisticStorage,
         ReportStorage);
 }
Esempio n. 13
0
        public void SetUp()
        {
            _reportAuthorityValidator = new Mock <IReportAuthorityValidator>();
            _reportRepository         = new Mock <IReportRepository>();
            _telemetryScopeProvider   = new Mock <ITelemetryScopeProvider>();
            _timeService   = new Mock <ITimeService>();
            _userPrincipal = new Mock <IUserPrincipal>();

            _telemetryScopeProvider
            .Setup(_ => _.Create <Reports>(It.IsAny <string>()))
            .Returns(Mock.Of <ITelemetryScope <Reports> >());

            _target = new ReportStorage(
                _reportAuthorityValidator.Object,
                _reportRepository.Object,
                _telemetryScopeProvider.Object,
                _timeService.Object,
                _userPrincipal.Object);
        }
 public ReportLogicEmployee(IReportStorage reportStorage)
 {
     _reportStorage = reportStorage;
 }
Esempio n. 15
0
 public ReportRepository(IReportStorage storage)
 {
     _storage = storage;
 }
Esempio n. 16
0
 public ReportsModule(IReportStorage reportStorage, IGlobalServerStatisticStorage globalStatisticStorage)
 {
     this.reportStorage          = reportStorage;
     this.globalStatisticStorage = globalStatisticStorage;
 }
        private UpdateController createController(ILocalConfiguration localConfig = null, IHttpClient httpClient = null, IUpdateClient updateClient = null,
                                                  ILog logger = null, ITaskHandler taskHandler = null, IStatusReporter reporter = null, IReportStorage reportStorage = null, ITimeFrameDecision timeFrameDecision = null)
        {
            if (localConfig == null)
            {
                localConfig = getLocalConfig();
            }

            if (httpClient == null)
            {
                httpClient = getHttpClient();
            }

            if (updateClient == null)
            {
                updateClient = Mock.Of <IUpdateClient>();
            }

            if (logger == null)
            {
                logger = Mock.Of <ILog>();
            }

            if (taskHandler == null)
            {
                taskHandler = Mock.Of <ITaskHandler>();
                Mock.Get(taskHandler).Setup(t => t.GetMachineName()).Returns(CServerName);
            }

            if (reporter == null)
            {
                reporter = Mock.Of <IStatusReporter>();
            }

            if (reportStorage == null)
            {
                reportStorage = Mock.Of <IReportStorage>();
            }

            if (timeFrameDecision == null)
            {
                timeFrameDecision = Mock.Of <ITimeFrameDecision>();
                Mock.Get(timeFrameDecision).Setup(t => t.IsWithinTimeFrame(It.IsAny <TimeFrame>())).Returns(true);
            }

            var controller = new UpdateController(localConfig, httpClient, updateClient, taskHandler, reporter, reportStorage, timeFrameDecision);

            controller.Logger = Mock.Of <ILog>();

            return(controller);
        }
Esempio n. 18
0
 public ReportRepository(IReportStorage reportStorage)
 {
     _reportStorage = reportStorage;
 }
Esempio n. 19
0
 public ReportService(IReportStorage reportStorage)
 {
     _reportStorage = reportStorage;
 }
Esempio n. 20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportsSaver{TFormat}"/> class.
 /// </summary>
 /// <param name="formatter">Desired report formatter to read reports.</param>
 /// <param name="storage">Desired storage to save reports data.</param>
 public ReportsSaver(IReportFormatter <TFormat> formatter, IReportStorage <TFormat> storage)
 {
     _formatter = formatter;
     _storage   = storage;
 }
Esempio n. 21
0
 public ReportService(IReportStorage reportStorage)
 {
     _reportStorage = reportStorage;
 }
 public ReportLogic(IReportStorage report)
 {
     storage = report;
 }
Esempio n. 23
0
 public ReportRepository(IReportStorage commonStorage)
 {
     _commonStorage = commonStorage;
 }