Table of Contents

Class ExtensionMethods

Namespace
EpNet.Results
Assembly
EpNet.dll
public static class ExtensionMethods
Inheritance
object
ExtensionMethods

Methods

Average(IEnumerable<ResultSet>)

Averages a list of result sets. If more than one frequency, picks the shorter one.

public static ResultSet Average(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

ResultSet

Resulting Result Set.

AverageAll(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> AverageAll(this IEnumerable<ResultSet> mixedResults)

Parameters

mixedResults IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

FirstAnnual(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstAnnual(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

FirstDaily(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstDaily(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

FirstHourly(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstHourly(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

FirstMonthly(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstMonthly(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

FirstRunPeriod(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstRunPeriod(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

FirstTimestep(IEnumerable<ResultSet>, Func<string, bool>)

public static ResultSet FirstTimestep(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

ResultSet

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 string
resultType string
frequency Frequencies

Returns

ResultSet

GetAll(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetAll(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetAnnual(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetAnnual(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetDaily(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetDaily(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetHourly(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetHourly(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetMonthly(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetMonthly(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetRunPeriod(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetRunPeriod(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetTimestep(IEnumerable<ResultSet>, Func<string, bool>)

public static IEnumerable<ResultSet> GetTimestep(this IEnumerable<ResultSet> results, Func<string, bool> filter = null)

Parameters

results IEnumerable<ResultSet>
filter Func<string, bool>

Returns

IEnumerable<ResultSet>

GetZone(ResultSet, IdfReader)

public static IdfObject GetZone(this ResultSet result, IdfReader idf)

Parameters

result ResultSet
idf IdfReader

Returns

IdfObject

GetZoneArea(ResultSet, IdfReader)

public static double GetZoneArea(this ResultSet result, IdfReader idf)

Parameters

result ResultSet
idf IdfReader

Returns

double

GetZoneArea(IEnumerable<ResultSet>, IdfReader)

public static double GetZoneArea(this IEnumerable<ResultSet> results, IdfReader idf)

Parameters

results IEnumerable<ResultSet>
idf IdfReader

Returns

double

GetZoneVolume(ResultSet, IdfReader)

public static double GetZoneVolume(this ResultSet result, IdfReader idf)

Parameters

result ResultSet
idf IdfReader

Returns

double

GetZoneVolume(IEnumerable<ResultSet>, IdfReader)

public static double GetZoneVolume(this IEnumerable<ResultSet> results, IdfReader idf)

Parameters

results IEnumerable<ResultSet>
idf IdfReader

Returns

double

GetZones(IEnumerable<ResultSet>, IdfReader)

public static IEnumerable<IdfObject> GetZones(this IEnumerable<ResultSet> results, IdfReader idf)

Parameters

results IEnumerable<ResultSet>
idf IdfReader

Returns

IEnumerable<IdfObject>

GroupByBlock(IEnumerable<ResultSet>, IEnumerable<IdfObject>)

public static Dictionary<string, IEnumerable<ResultSet>> GroupByBlock(this IEnumerable<ResultSet> results, IEnumerable<IdfObject> Idf)

Parameters

results IEnumerable<ResultSet>
Idf IEnumerable<IdfObject>

Returns

Dictionary<string, IEnumerable<ResultSet>>

GroupByComponent(IEnumerable<ResultSet>, IEnumerable<string>)

public static Dictionary<string, IEnumerable<ResultSet>> GroupByComponent(this IEnumerable<ResultSet> results, IEnumerable<string> componentSubstrings)

Parameters

results IEnumerable<ResultSet>
componentSubstrings IEnumerable<string>

Returns

Dictionary<string, IEnumerable<ResultSet>>

GroupByZone(IEnumerable<ResultSet>, IEnumerable<IdfObject>)

public static Dictionary<string, IEnumerable<ResultSet>> GroupByZone(this IEnumerable<ResultSet> results, IEnumerable<IdfObject> Idf)

Parameters

results IEnumerable<ResultSet>
Idf IEnumerable<IdfObject>

Returns

Dictionary<string, IEnumerable<ResultSet>>

SetReportType(IEnumerable<ResultSet>, string)

public static IEnumerable<ResultSet> SetReportType(this IEnumerable<ResultSet> results, string reportType)

Parameters

results IEnumerable<ResultSet>
reportType string

Returns

IEnumerable<ResultSet>

SetUnits(IEnumerable<ResultSet>, string)

public static IEnumerable<ResultSet> SetUnits(this IEnumerable<ResultSet> results, string units)

Parameters

results IEnumerable<ResultSet>
units string

Returns

IEnumerable<ResultSet>

Sum(IEnumerable<ResultSet>)

Sums a list of result sets. If more than one frequency, picks the shorter one.

public static ResultSet Sum(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

ResultSet

Resulting Result Set.

SumAll(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> SumAll(this IEnumerable<ResultSet> mixedResults)

Parameters

mixedResults IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

ToAnnual(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> ToAnnual(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

ToDaily(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> ToDaily(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

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 Frequencies

Final Frequency.

average bool

If true, results are averaged.

Returns

IEnumerable<ResultSet>

ToHourly(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> ToHourly(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

ToKWh(double)

Converts from J to kWh (divides between 3600000)

public static double ToKWh(this double value)

Parameters

value double

Value in J

Returns

double

Value in kWh

ToMonthly(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> ToMonthly(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>

ToRunPeriod(IEnumerable<ResultSet>)

public static IEnumerable<ResultSet> ToRunPeriod(this IEnumerable<ResultSet> results)

Parameters

results IEnumerable<ResultSet>

Returns

IEnumerable<ResultSet>