Class ExtensionMethods
public static class ExtensionMethods
- Inheritance
-
ExtensionMethods
Methods
Average(IEnumerable<ResultSet>)
Averages a list of result sets.
public static ResultSet Average(this IEnumerable<ResultSet> results)
Parameters
results
IEnumerable<ResultSet>
Returns
- ResultSet
Resulting Result Set.
Get(IEnumerable<ResultSet>, string, string, Frequencies)
Gets the result that matches the conditions.
public static ResultSet Get(this IEnumerable<ResultSet> results, string component, string resultType, Frequencies frequency)
Parameters
results
IEnumerable<ResultSet>component
stringresultType
stringfrequency
Frequencies
Returns
Sum(IEnumerable<ResultSet>)
Sums a list of result sets.
public static ResultSet Sum(this IEnumerable<ResultSet> results)
Parameters
results
IEnumerable<ResultSet>
Returns
- ResultSet
Resulting Result Set.
ToFrequency(IEnumerable<ResultSet>, Frequencies, bool)
Transforms a list of result sets from a specified frequency to another. Results can be summed or averaged during the transformation.
public static IEnumerable<ResultSet> ToFrequency(this IEnumerable<ResultSet> results, Frequencies finalFrequency, bool average = false)
Parameters
results
IEnumerable<ResultSet>List of result sets to process.
finalFrequency
FrequenciesFinal Frequency.
average
boolIf true, results are averaged.
Returns
ToKWh(double)
Converts from J to kWh (divides between 3600000)
public static double ToKWh(this double value)
Parameters
value
doubleValue in J
Returns
- double
Value in kWh