Beispiel #1
0
        public static IHttpClientBuilder AddAuthManagement(this IServiceCollection services, Action <ManagementClientSettings> settings)
        {
            var s = new ManagementClientSettings();

            settings?.Invoke(s);

            services.AddSingleton(s);

            return(services.AddHttpClient <ManagementClient>(builder => {
                builder.BaseAddress = s.Domain;
            }));
        }
Beispiel #2
0
 public OrderController(IPublicOrder client,
                        IEntityProvider entityProvider,
                        IKontrollstellenInformer kontrollstellenInformer,
                        IElasticService elasticService,
                        DigitalisierungsbeschraenkungSettings digitalisierungsbeschraenkungSettings,
                        IUserDataAccess userDataAccess,
                        VerwaltungsausleiheSettings verwaltungsausleiheSettings,
                        ManagementClientSettings managementClientSettings)
 {
     this.client                  = client;
     this.entityProvider          = entityProvider;
     this.kontrollstellenInformer = kontrollstellenInformer;
     this.elasticService          = elasticService;
     this.digitalisierungsbeschraenkungSettings = digitalisierungsbeschraenkungSettings;
     this.userDataAccess = userDataAccess;
     this.verwaltungsausleiheSettings = verwaltungsausleiheSettings;
     this.managementClientSettings    = managementClientSettings;
 }
Beispiel #3
0
        public PublicController(IEntityProvider entityProvider, IModelData modelData, ManagementClientSettings managementClientSettings, FrontendDynamicTextSettings frontendDynamicTextSettings)
        {
            this.entityProvider = entityProvider;
            this.modelData = modelData;
            this.managementClientSettings = managementClientSettings;
            this.frontendDynamicTextSettings = frontendDynamicTextSettings;

            var woerterbuch = new FileWoerterbuch(new PhysicalFileSystem(), Path.Combine(DirectoryHelper.Instance.ConfigDirectory, "Synonyme"));
            var settingAsText = ServiceHelper.Settings["synonymMaxInputWords"];
            int maxInputWords;
            if (!string.IsNullOrEmpty(settingAsText))
            {
                maxInputWords = Convert.ToInt32(settingAsText);
            }
            else
            {
                maxInputWords = 15;
            }

            synonymFinder = new SynonymFinder(woerterbuch, maxInputWords);
        }
Beispiel #4
0
 public ManagementClient(HttpClient client, ILogger <ManagementClient> logger, ManagementClientSettings settings)
 {
     HttpClient = client;
     Logger     = logger;
     Settings   = settings;
 }