public LastSessionsInGamePurchasesGetter(IInGamePurchasesGetter currentData, IInGamePurchasesGetter receivedData) { IInGamePurchasesGetter inGamePurchases = currentData.EstimatedCostInStars >= receivedData.EstimatedCostInStars ? currentData : receivedData; EstimatedCostInStars = inGamePurchases.EstimatedCostInStars; TotalStars = inGamePurchases.TotalStars; }
public InGamePurchasesData(IInGamePurchasesGetter dataGetter) { if (dataGetter == null) { throw new System.ArgumentNullException(nameof(dataGetter)); } EstimatedCostInStars = dataGetter.EstimatedCostInStars; TotalStars = dataGetter.TotalStars; }
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); }
private void SetInGamePurchasesText(IInGamePurchasesGetter InGamePurchases) { totalStars = $"Total stars: {InGamePurchases.TotalStars}"; }
public UsedInGamePurchasesGetter(IInGamePurchasesGetter currentSessionData, IInGamePurchasesGetter lastSessionsData) { this.currentSessionData = currentSessionData ?? throw new ArgumentNullException(nameof(currentSessionData)); this.lastSessionsData = lastSessionsData ?? throw new ArgumentNullException(nameof(lastSessionsData)); }