コード例 #1
0
        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();
        }
コード例 #2
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);
 }
コード例 #3
0
 public ServerStatisticStorage(IGlobalServerStatisticStorage globalStatistic)
 {
     this.globalStatistic = globalStatistic;
 }
コード例 #4
0
 public ReportsModule(IReportStorage reportStorage, IGlobalServerStatisticStorage globalStatisticStorage)
 {
     this.reportStorage          = reportStorage;
     this.globalStatisticStorage = globalStatisticStorage;
 }
コード例 #5
0
 public double AverageMatchesPerDay(IGlobalServerStatisticStorage globalStatisticStorage)
 {
     return(TotalMatchesPlayed / ((globalStatisticStorage.LastDayWithMatch - globalStatisticStorage.FirstDayWithMatch).Days + 1));
 }