public static void RegisterFrontendInjectables(this ContainerBuilder builder)
        {
            var connectionString = FrontendSettingsViaduc.Instance.SqlConnectionString;
            var sftpLicenseKey   = WebHelper.Settings["sftpLicenseKey"];

            builder.RegisterType <ExcelExportHelper>().AsSelf();
            builder.RegisterType <VeExportRecordHelper>().AsSelf();
            builder.RegisterType <ParameterHelper>().As <IParameterHelper>();
            builder.Register(c => c.Resolve <IParameterHelper>().GetSetting <DigitalisierungsbeschraenkungSettings>()).AsSelf();
            builder.Register(c => c.Resolve <IParameterHelper>().GetSetting <ManagementClientSettings>()).AsSelf();
            builder.Register(c => c.Resolve <IParameterHelper>().GetSetting <VerwaltungsausleiheSettings>()).AsSelf();
            builder.Register(c => c.Resolve <IParameterHelper>().GetSetting <AutomatischeBenachrichtigungAnKontrollstelle>()).AsSelf();
            builder.Register(c => c.Resolve <IParameterHelper>().GetSetting <FrontendDynamicTextSettings>()).AsSelf();

            builder.Register(c => ServerSettings.GetServerSettings <ElasticSettings>()).As <IElasticSettings>();

            builder.RegisterType <EntityProvider>().As <IEntityProvider>().InstancePerRequest();
            builder.RegisterType <ElasticClientProvider>().As <IElasticClientProvider>();
            builder.RegisterType <ElasticService>().As <IElasticService>().SingleInstance().ExternallyOwned();
            builder.RegisterType <PhysicalFileSystem>().As <IFileSystem>().SingleInstance();

            builder.RegisterType <ModelData>().As <IModelData>();
            builder.RegisterType <CmiSettings>().As <ICmiSettings>();
            builder.RegisterType <WebCmiConfigProvider>().As <IWebCmiConfigProvider>();
            builder.RegisterType <KontrollstellenInformer>().As <IKontrollstellenInformer>();

            builder.RegisterType <OrderManagerClient>().As <IPublicOrder>();
            builder.RegisterType <FileDownloadHelper>().As <IFileDownloadHelper>();

            builder.Register(c => FrontendSettingsViaduc.Instance).As <ITranslator>().SingleInstance().ExternallyOwned();
            builder.Register(c => new UsageAnalyzer(GetUsageSettings(), UsageType.Download)).As <IUsageAnalyzer>().SingleInstance().ExternallyOwned();

            builder.RegisterType <UserDataAccess>().As <IUserDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <CacheHelper>().As <ICacheHelper>().WithParameter(nameof(sftpLicenseKey), sftpLicenseKey);

            builder.Register(c => new UserAccessProvider(c.Resolve <IUserDataAccess>())).As <IUserAccessProvider>();
            builder.RegisterType <AuthenticationHelper>().As <IAuthenticationHelper>();

            builder.RegisterType <OrderDataAccess>().As <IOrderDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <ApplicationRoleUserDataAccess>().As <IApplicationRoleUserDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <ApplicationRoleDataAccess>().As <IApplicationRoleDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <DownloadTokenDataAccess>().As <IDownloadTokenDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <DownloadLogDataAccess>().As <IDownloadLogDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);

            builder.Register(c => BusConfig.RegisterDownloadAssetCallback()).As <IRequestClient <DownloadAssetRequest> >();
            builder.Register(c => BusConfig.RegisterGetAssetStatusCallback()).As <IRequestClient <GetAssetStatusRequest> >();
            builder.Register(c => BusConfig.RegisterPrepareAssetCallback()).As <IRequestClient <PrepareAssetRequest> >();
        }
        public static void RegisterManagementInjectables(this ContainerBuilder builder)
        {
            builder.RegisterType <OrderManagerClient>().AsSelf();
            builder.RegisterType <ExcelExportHelper>().AsSelf();
            builder.RegisterType <CacheHelper>().As <ICacheHelper>().WithParameter("sftpLicenseKey", WebHelper.Settings["sftpLicenseKey"]);

            var connectionString = ManagementSettingsViaduc.Instance.SqlConnectionString;

            builder.RegisterType <UserDataAccess>().As <IUserDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <ApplicationRoleDataAccess>().As <IApplicationRoleDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <ApplicationRoleUserDataAccess>().As <IApplicationRoleUserDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <AblieferndeStelleDataAccess>().As <IAblieferndeStelleDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <AblieferndeStelleTokenDataAccess>().As <IAblieferndeStelleTokenDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <DownloadTokenDataAccess>().As <IDownloadTokenDataAccess>().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);
            builder.RegisterType <NewsDataAccess>().AsSelf().InstancePerRequest().WithParameter(nameof(connectionString), connectionString);

            builder.Register(c => BusConfig.CreateGetElasticLogRecordsRequestClient()).As <IRequestClient <GetElasticLogRecordsRequest> >();
            builder.Register(c => BusConfig.GetExternalContentClient()).As <IRequestClient <SyncInfoForReportRequest> >();
            builder.Register(c => BusConfig.RegisterDownloadAssetCallback()).As <IRequestClient <DownloadAssetRequest> >();
            builder.Register(c => BusConfig.CreateDoesExistInCacheClient()).As <IRequestClient <DoesExistInCacheRequest> >();

            builder.RegisterType <AuthenticationHelper>().As <IAuthenticationHelper>();
            builder.RegisterType <ParameterHelper>().As <IParameterHelper>();
            builder.RegisterType <MailHelper>().As <IMailHelper>();

            builder.RegisterType <CmiSettings>().As <ICmiSettings>();
            builder.RegisterType <WebCmiConfigProvider>().As <IWebCmiConfigProvider>();

            builder.RegisterType <OrderManagerClient>().As <IPublicOrder>();
            builder.RegisterType <FileDownloadHelper>().As <IFileDownloadHelper>();
            builder.RegisterType <ReportExternalContentHelper>().As <IReportExternalContentHelper>();
            builder.RegisterType <AbbyyProgressInfo>().SingleInstance().AsSelf();

            // register all the consumers
            builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
            .AssignableTo <IConsumer>()
            .AsSelf();
        }