BO4E.Extensions/BusinessObjects/Energiemenge/EnergiemengeExtensionPlausibility.cs
/// <summary>
///     creates a dictionary of completeness reports for a given list of reference time ranges.
/// </summary>
/// <param name="em">Energiemenge</param>
/// <param name="config">container containing the relevant data</param>
/// <param name="ranges">list of ranges for which the completeness reports are generated</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, PlausibilityReport> GetSlicedPlausibilityReports(this BO.Energiemenge em,
            PlausibilityReportConfiguration config, IEnumerable<ITimeRange> ranges)
        {
            if (ranges == null) throw new ArgumentNullException(nameof(ranges), "list of time ranges must not be null");
            var result = new Dictionary<ITimeRange, PlausibilityReport>();
            foreach (var range in ranges)
            {
                var localConfig =
                    JsonConvert.DeserializeObject<PlausibilityReportConfiguration>(JsonConvert.SerializeObject(config));
                localConfig.Timeframe = new Zeitraum
                {
                    Startdatum = range.Start,
                    Enddatum = range.End
                };
                var subResult = GetPlausibilityReport(em, localConfig);
                result.Add(range, subResult);
            }
            return result;
        }
public static IDictionary < ITimeRange , PlausibilityReport > GetSlicedPlausibilityReports ( this BO . Energiemenge em , PlausibilityReportConfiguration config , IEnumerable < ITimeRange > ranges ) { if ( ranges == null ) throw new ArgumentNullException ( nameof ( ranges ) , " " ) ; var result = new Dictionary < ITimeRange , PlausibilityReport > ( ) ; foreach ( var range in ranges ) { var localConfig = JsonConvert . DeserializeObject < PlausibilityReportConfiguration > ( JsonConvert . SerializeObject ( config ) ) ; localConfig . Timeframe = new Zeitraum { Startdatum = range . Start , Enddatum = range . End } ; var subResult = GetPlausibilityReport ( em , localConfig ) ; result . Add ( range , subResult ) ; } return result ; }
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
config
PlausibilityReportConfiguration
container containing the relevant data
container containing the relevant data
ranges
IEnumerable<ITimeRange>
list of ranges for which the completeness reports are generated
list of ranges for which the completeness reports are generated
em
None