public SpringBootClient(ILogger <SpringBootClient> logger, IApplicationBuilder applicationBuilder, IOptionsMonitor <SpringBootConfig> optionsAccessor, ISpringBootAdminRESTAPI restApi)
        {
            if (logger is null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (applicationBuilder is null)
            {
                throw new ArgumentNullException(nameof(applicationBuilder));
            }

            if (optionsAccessor is null)
            {
                throw new ArgumentNullException(nameof(optionsAccessor));
            }

            if (restApi is null)
            {
                throw new ArgumentNullException(nameof(restApi));
            }

            this.logger  = logger;
            this.restApi = restApi;
            config       = optionsAccessor.CurrentValue;
            app          = applicationBuilder.CreateApplication();
        }
        public ApplicationBuilder(IWebHostEnvironment environment, IEnumerable <IMetadataProvider> metadataProviders, IOptionsMonitor <SpringBootConfig> optionsAccessor)
        {
            this.environment       = environment;
            this.metadataProviders = metadataProviders;

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

            config = optionsAccessor.CurrentValue;
        }