20 lines
498 B
C#
20 lines
498 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
|
|||
|
namespace Weee.Models.ExtensionMethods
|
|||
|
{
|
|||
|
public static class SteamUsageExtension
|
|||
|
{
|
|||
|
public static decimal GetTotalSteamUsage(this ICollection<SteamUsage> steamUsages)
|
|||
|
{
|
|||
|
decimal totalSteamUsage = 0;
|
|||
|
foreach (var steamUsage in steamUsages) {
|
|||
|
totalSteamUsage += steamUsage.Scalar;
|
|||
|
}
|
|||
|
|
|||
|
return totalSteamUsage;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|