using System.Collections.Generic;
using Ato.CD.Inbound.Shared;
using Ato.EN.IntegrationServices.CodeGenerationLS;

namespace Ato.CD.Inbound.Shared201702
{
    public static class LS2017ContextsExtension
    {
        public static List<Context> GetContexts(this LS2017 ls) => new List<Context>()
            .AddContext(ls.RPStartDate, ls.RPEndDate, ls.RPOccurrenceIndex, ls.RPId)
            .AddContext(ls.RPY0StartDate, ls.RPY0EndDate, ls.RPY0OccurrenceIndex, ls.RPY0Id)
            .AddContext(ls.RPY0Minus1StartDate, ls.RPY0Minus1EndDate, ls.RPY0Minus1OccurrenceIndex, ls.RPY0Minus1Id)
            .AddContext(ls.RPY0Minus2StartDate, ls.RPY0Minus2EndDate, ls.RPY0Minus2OccurrenceIndex, ls.RPY0Minus2Id)
            .AddContext(ls.RPY0Minus3StartDate, ls.RPY0Minus3EndDate, ls.RPY0Minus3OccurrenceIndex, ls.RPY0Minus3Id)
            .AddContext(ls.RPY0Minus4StartDate, ls.RPY0Minus4EndDate, ls.RPY0Minus4OccurrenceIndex, ls.RPY0Minus4Id)
            .AddContext(ls.RPY0Minus5PStartDate, ls.RPY0Minus5PEndDate, ls.RPY0Minus5POccurrenceIndex, ls.RPY0Minus5PId)
            .AddContext(ls.RPALLStartDate, ls.RPALLEndDate, ls.RPALLOccurrenceIndex, ls.RPALLId);
    }
}