BO4E.Extensions/BusinessObjects/Energiemenge/EnergiemengeExtension.cs
/// <summary>
///     Test, if the Energiemenge does have a defined value for every point in time within the given time range.
/// </summary>
/// <param name="em">Energiemenge</param>
/// <param name="reference">time range to check</param>
/// <returns>true iff Energiemenge has defined value for every point in time range, false otherwise</returns>
Test, if the Energiemenge does have a defined value for every point in time within the given time range.
Test if the Energiemenge does have a defined value for every point in time within the given time range .
public static bool IsContinuous(this BO.Energiemenge em, TimeRange reference)
        {
            return Math.Abs(em.Energieverbrauch.Sum(v =>
                GetOverlapFactor(new TimeRange((v.Startdatum ?? DateTimeOffset.MinValue).DateTime, (v.Enddatum ?? DateTimeOffset.MinValue).DateTime), reference, true)) - 1.0M) < QUASI_ZERO;
        }
public static bool IsContinuous ( this BO . Energiemenge em , TimeRange reference ) { return Math . Abs ( em . Energieverbrauch . Sum ( v => GetOverlapFactor ( new TimeRange ( ( v . Startdatum ?? DateTimeOffset . MinValue ) . DateTime , ( v . Enddatum ?? DateTimeOffset . MinValue ) . DateTime ) , reference , true ) ) - 1.0M ) < QUASI_ZERO ; }
Test, if the Energiemenge does have a defined value for every point in time within the given time range.
Test if the Energiemenge does have a defined value for every point in time within the given time range .
true iff Energiemenge has defined value for every point in time range, false otherwise
true iff Energiemenge has defined value for every point in time range false otherwise
BO.Energiemenge
this
<not_specific>
reference
TimeRange
time range to check
time range to check
em
<not_specific>
None