Example #1
0
    public LastSessionsInGamePurchasesGetter(IInGamePurchasesGetter currentData, IInGamePurchasesGetter receivedData)
    {
        IInGamePurchasesGetter inGamePurchases = currentData.EstimatedCostInStars >= receivedData.EstimatedCostInStars ? currentData : receivedData;

        EstimatedCostInStars = inGamePurchases.EstimatedCostInStars;
        TotalStars           = inGamePurchases.TotalStars;
    }
Example #2
0
    public InGamePurchasesData(IInGamePurchasesGetter dataGetter)
    {
        if (dataGetter == null)
        {
            throw new System.ArgumentNullException(nameof(dataGetter));
        }

        EstimatedCostInStars = dataGetter.EstimatedCostInStars;
        TotalStars           = dataGetter.TotalStars;
    }
Example #3
0
    public UsedDataGetter(IDataGetter currentSessionData, IDataGetter lastSessionsData)
    {
        if (currentSessionData == null)
        {
            throw new ArgumentNullException(nameof(currentSessionData));
        }
        if (lastSessionsData == null)
        {
            throw new ArgumentNullException(nameof(lastSessionsData));
        }

        Id = currentSessionData.Id;
        usedStatsGetter           = new UsedStatsGetter(currentSessionData.Stats, lastSessionsData.Stats);
        usedInGamePurchasesGetter = new UsedInGamePurchasesGetter(currentSessionData.InGamePurchases, lastSessionsData.InGamePurchases);
    }
Example #4
0
 private void SetInGamePurchasesText(IInGamePurchasesGetter InGamePurchases)
 {
     totalStars = $"Total stars: {InGamePurchases.TotalStars}";
 }
Example #5
0
 public UsedInGamePurchasesGetter(IInGamePurchasesGetter currentSessionData, IInGamePurchasesGetter lastSessionsData)
 {
     this.currentSessionData = currentSessionData ?? throw new ArgumentNullException(nameof(currentSessionData));
     this.lastSessionsData   = lastSessionsData ?? throw new ArgumentNullException(nameof(lastSessionsData));
 }