public static IServiceCollection AddGovUkFrontend(
            this IServiceCollection services,
            GovUkFrontendAspNetCoreOptions options)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            services.AddSingleton(options);

            services.TryAddSingleton <IGovUkHtmlGenerator, DefaultGovUkHtmlGenerator>();

            if (options.AddImportsToHtml)
            {
                services.AddTransient <ITagHelperComponent, GdsImportsTagHelperComponent>();
            }

            services.Configure <MvcOptions>(options =>
            {
                options.ModelBinderProviders.Insert(0, new DateInputModelBinderProvider());
            });

            return(services);
        }
 public ConfigureMvcOptions(IOptions <GovUkFrontendAspNetCoreOptions> gfaOptionsAccessor)
 {
     _gfaOptions = gfaOptionsAccessor.Value;
 }