message: Added DateDefaults.CreateFrom DaxTemplate.TemplateConfiguration
diff: {
  using Dax.Template.Enums;
  using Dax.Template.Tables;
  - using Sqlbi.Bravo.Infrastructure.Extensions;
  - using System;
  using System.Text.Json.Serialization;
  public class DateConfiguration
  [JsonConverter(typeof(JsonStringEnumConverter))]
  public AutoNamingEnum? AutoNaming { get; set; }
  - public DateDefaults Defaults { get; init; } = new();
  + public DateDefaults? Defaults { get; set; }
  public static DateConfiguration CreateFrom(TemplateConfiguration templateConfiguration)
  {
  // ???? TargetMeasures
  AutoScan = templateConfiguration.AutoScan,
  - AutoNaming = templateConfiguration.AutoNaming
  - };
  -
  - configuration.Defaults.FirstFiscalMonth = GetIntParameter(nameof(configuration.Defaults.FirstFiscalMonth));
  - configuration.Defaults.FirstDayOfWeek = (DayOfWeek?)GetIntParameter(nameof(configuration.Defaults.FirstDayOfWeek));
  - configuration.Defaults.MonthsInYear = GetIntParameter(nameof(configuration.Defaults.MonthsInYear));
  - configuration.Defaults.WorkingDayType = GetQuotedStringParameter(nameof(configuration.Defaults.WorkingDayType));
  - configuration.Defaults.NonWorkingDayType = GetQuotedStringParameter(nameof(configuration.Defaults.NonWorkingDayType));
  - configuration.Defaults.TypeStartFiscalYear = (TypeStartFiscalYear?)GetIntParameter(nameof(configuration.Defaults.TypeStartFiscalYear));
  -
  - var quarterWeekTypeParameter = GetQuotedStringParameter(nameof(configuration.Defaults.QuarterWeekType));
  -
  - if (Enum.TryParse(quarterWeekTypeParameter, out QuarterWeekType quarterWeekType))
  - {
  - configuration.Defaults.QuarterWeekType = quarterWeekType;
  - }
  -
  - var weeklyTypeParameter = GetQuotedStringParameter(nameof(configuration.Defaults.WeeklyType));
  + AutoNaming = templateConfiguration.AutoNaming,
  - if (Enum.TryParse(weeklyTypeParameter, out WeeklyType weeklyType))
  - {
  - configuration.Defaults.WeeklyType = weeklyType;
  - }
  + Defaults = DateDefaults.CreateFrom(templateConfiguration)
  + };
  return configuration;
  -
  - int? GetIntParameter(string? parameterName)
  - {
  - var value = GetStringParameter(parameterName);
  - if (value == null)
  - return null;
  -
  - if (int.TryParse(value, out var valueInt))
  - return valueInt;
  -
  - return null;
  - }
  -
  - string? GetStringParameter(string? parameterName)
  - {
  - if (parameterName.IsNullOrEmpty())
  - return null;
  -
  - if (templateConfiguration.DefaultVariables.TryGetValue($"__{ parameterName }", out string? value))
  - return value;
  -
  - return null;
  - }
  -
  - string? GetQuotedStringParameter(string? parameterName)
  - {
  - var value = GetStringParameter(parameterName);
  - if (value.IsNullOrEmpty())
  - return null;
  -
  - if ((value[0] == '"') && (value[^1] == '"'))
  - value = value[1..^1];
  -
  - return value;
  - }
  }
  }
  }
  