public GermanDateParserConfiguration(ICommonDateTimeParserConfiguration config) : base(config) { DateTokenPrefix = DateTimeDefinitions.DateTokenPrefix; IntegerExtractor = config.IntegerExtractor; OrdinalExtractor = config.OrdinalExtractor; CardinalExtractor = config.CardinalExtractor; NumberParser = config.NumberParser; DurationExtractor = config.DurationExtractor; DateExtractor = config.DateExtractor; DurationParser = config.DurationParser; DateRegexes = new GermanDateExtractorConfiguration(this).DateRegexList; OnRegex = GermanDateExtractorConfiguration.OnRegex; SpecialDayRegex = GermanDateExtractorConfiguration.SpecialDayRegex; SpecialDayWithNumRegex = GermanDateExtractorConfiguration.SpecialDayWithNumRegex; NextRegex = GermanDateExtractorConfiguration.NextDateRegex; ThisRegex = GermanDateExtractorConfiguration.ThisRegex; LastRegex = GermanDateExtractorConfiguration.LastDateRegex; UnitRegex = GermanDateExtractorConfiguration.DateUnitRegex; WeekDayRegex = GermanDateExtractorConfiguration.WeekDayRegex; MonthRegex = GermanDateExtractorConfiguration.MonthRegex; WeekDayOfMonthRegex = GermanDateExtractorConfiguration.WeekDayOfMonthRegex; ForTheRegex = GermanDateExtractorConfiguration.ForTheRegex; WeekDayAndDayOfMothRegex = GermanDateExtractorConfiguration.WeekDayAndDayOfMothRegex; RelativeMonthRegex = GermanDateExtractorConfiguration.RelativeMonthRegex; YearSuffix = GermanDateExtractorConfiguration.YearSuffix; RelativeWeekDayRegex = GermanDateExtractorConfiguration.RelativeWeekDayRegex; DayOfMonth = config.DayOfMonth; DayOfWeek = config.DayOfWeek; MonthOfYear = config.MonthOfYear; CardinalMap = config.CardinalMap; UnitMap = config.UnitMap; UtilityConfiguration = config.UtilityConfiguration; }
public GermanDateParserConfiguration(ICommonDateTimeParserConfiguration config) : base(config) { DateTokenPrefix = DateTimeDefinitions.DateTokenPrefix; IntegerExtractor = config.IntegerExtractor; OrdinalExtractor = config.OrdinalExtractor; CardinalExtractor = config.CardinalExtractor; NumberParser = config.NumberParser; DurationExtractor = config.DurationExtractor; DateExtractor = config.DateExtractor; DurationParser = config.DurationParser; HolidayParser = new BaseHolidayParser(new GermanHolidayParserConfiguration(this)); DateRegexes = new GermanDateExtractorConfiguration(this).DateRegexList; OnRegex = GermanDateExtractorConfiguration.OnRegex; SpecialDayRegex = GermanDateExtractorConfiguration.SpecialDayRegex; SpecialDayWithNumRegex = GermanDateExtractorConfiguration.SpecialDayWithNumRegex; NextRegex = GermanDateExtractorConfiguration.NextDateRegex; ThisRegex = GermanDateExtractorConfiguration.ThisRegex; LastRegex = GermanDateExtractorConfiguration.LastDateRegex; UnitRegex = GermanDateExtractorConfiguration.DateUnitRegex; WeekDayRegex = GermanDateExtractorConfiguration.WeekDayRegex; MonthRegex = GermanDateExtractorConfiguration.MonthRegex; WeekDayOfMonthRegex = GermanDateExtractorConfiguration.WeekDayOfMonthRegex; ForTheRegex = GermanDateExtractorConfiguration.ForTheRegex; WeekDayAndDayOfMothRegex = GermanDateExtractorConfiguration.WeekDayAndDayOfMothRegex; WeekDayAndDayRegex = GermanDateExtractorConfiguration.WeekDayAndDayRegex; RelativeMonthRegex = GermanDateExtractorConfiguration.RelativeMonthRegex; StrictRelativeRegex = GermanDateExtractorConfiguration.StrictRelativeRegex; YearSuffix = GermanDateExtractorConfiguration.YearSuffix; BeforeAfterRegex = GermanDateExtractorConfiguration.BeforeAfterRegex; RelativeWeekDayRegex = GermanDateExtractorConfiguration.RelativeWeekDayRegex; RelativeDayRegex = RegexCache.Get(DateTimeDefinitions.RelativeDayRegex, RegexOptions.Singleline); NextPrefixRegex = RegexCache.Get(DateTimeDefinitions.NextPrefixRegex, RegexOptions.Singleline); AfterNextPrefixRegex = RegexCache.Get(DateTimeDefinitions.AfterNextPrefixRegex, RegexOptions.Singleline); PreviousPrefixRegex = RegexCache.Get(DateTimeDefinitions.PreviousPrefixRegex, RegexOptions.Singleline); UpcomingPrefixRegex = RegexCache.Get(DateTimeDefinitions.UpcomingPrefixRegex, RegexOptions.Singleline); PastPrefixRegex = RegexCache.Get(DateTimeDefinitions.PastPrefixRegex, RegexOptions.Singleline); DayOfMonth = config.DayOfMonth; DayOfWeek = config.DayOfWeek; MonthOfYear = config.MonthOfYear; CardinalMap = config.CardinalMap; UnitMap = config.UnitMap; UtilityConfiguration = config.UtilityConfiguration; SameDayTerms = DateTimeDefinitions.SameDayTerms.ToImmutableList(); PlusOneDayTerms = DateTimeDefinitions.PlusOneDayTerms.ToImmutableList(); PlusTwoDayTerms = DateTimeDefinitions.PlusTwoDayTerms.ToImmutableList(); MinusOneDayTerms = DateTimeDefinitions.MinusOneDayTerms.ToImmutableList(); MinusTwoDayTerms = DateTimeDefinitions.MinusTwoDayTerms.ToImmutableList(); }