BO4E.Extensions/BusinessObjects/Energiemenge/EnergiemengeExtensionCompleteness.cs
/// <summary>
///     <see
///         cref="GetCompletenessReport(BO4E.BO.Energiemenge,Itenso.TimePeriod.ITimeRange,BO4E.ENUM.Wertermittlungsverfahren?,string,BO4E.ENUM.Mengeneinheit)" />
///     for pure Energiemengen within their own time range.
/// </summary>
/// <param name="em">Energiemenge</param>
/// <returns>
///     <see
///         cref="GetCompletenessReport(BO4E.BO.Energiemenge,Itenso.TimePeriod.ITimeRange,BO4E.ENUM.Wertermittlungsverfahren?,string,BO4E.ENUM.Mengeneinheit)" />
/// </returns>
for pure Energiemengen within their own time range.
for pure Energiemengen within their own time range .
public static CompletenessReport GetCompletenessReport(this BO.Energiemenge em)
        {
            if (!em.IsPure())
                throw new ArgumentException(
                    "The provided Energiemenge is not pure. Please use overloaded method GetCompletenessReport(... , wertermittlungsverfahren, obiskennzahl, mengeneinheit).");
            Verbrauch v;
            try
            {
                v = em.Energieverbrauch.First();
            }
            catch (InvalidOperationException)
            {
                return new CompletenessReport
                {
                    Coverage = null,
                    LokationsId = em.LokationsId,
                    ErrorMessage = "energieverbrauch is empty"
                };
            }
            return em.GetCompletenessReport(em.GetTimeRange(), v.Wertermittlungsverfahren, v.Obiskennzahl, v.Einheit);
        }
public static CompletenessReport GetCompletenessReport ( this BO . Energiemenge em ) { if ( ! em . IsPure ( ) ) throw new ArgumentException ( " " ) ; Verbrauch v ; try { v = em . Energieverbrauch . First ( ) ; } catch ( InvalidOperationException ) { return new CompletenessReport { Coverage = null , LokationsId = em . LokationsId , ErrorMessage = " " } ; } return em . GetCompletenessReport ( em . GetTimeRange ( ) , v . Wertermittlungsverfahren , v . Obiskennzahl , v . Einheit ) ; }
None
BO.Energiemenge
this
em
None