BO4E.Extensions/BusinessObjects/Energiemenge/EnergiemengeExtensionCompleteness.cs
/// <summary>
///     creates a dictionary of completeness reports for a given list of reference time ranges.
/// </summary>
/// <param name="em">Energiemenge</param>
/// <param name="ranges">list of ranges for which the completeness reports are generated</param>
/// <param name="useParallelExecution">set true to internally use parallel linq</param>
/// <returns></returns>
creates a dictionary of completeness reports for a given list of reference time ranges.
creates a dictionary of completeness reports for a given list of reference time ranges .
public static IDictionary<ITimeRange, CompletenessReport> GetSlicedCompletenessReports(this BO.Energiemenge em,
            IEnumerable<ITimeRange> ranges, bool useParallelExecution = false)
        {
            if (ranges == null) throw new ArgumentNullException(nameof(ranges), "list of time ranges must not be null");
            if (ranges.Any())
            {
                if (useParallelExecution)
                    return ranges.AsParallel().ToDictionary(r => r, r => GetCompletenessReport(em, r));
                return ranges.ToDictionary(r => r, r => GetCompletenessReport(em, r));
            }
            return new Dictionary<ITimeRange, CompletenessReport>();
        }
public static IDictionary < ITimeRange , CompletenessReport > GetSlicedCompletenessReports ( this BO . Energiemenge em , IEnumerable < ITimeRange > ranges , bool useParallelExecution = false ) { if ( ranges == null ) throw new ArgumentNullException ( nameof ( ranges ) , " " ) ; if ( ranges . Any ( ) ) { if ( useParallelExecution ) return ranges . AsParallel ( ) . ToDictionary ( r => r , r => GetCompletenessReport ( em , r ) ) ; return ranges . ToDictionary ( r => r , r => GetCompletenessReport ( em , r ) ) ; } return new Dictionary < ITimeRange , CompletenessReport > ( ) ; }
creates a dictionary of completeness reports for a given list of reference time ranges.
creates a dictionary of completeness reports for a given list of reference time ranges .
None
BO.Energiemenge
this
ranges
IEnumerable<ITimeRange>
list of ranges for which the completeness reports are generated
list of ranges for which the completeness reports are generated
useParallelExecution
bool
set true to internally use parallel linq
set true to internally use parallel linq
em
None