Beispiel #1
0
        public CloudServiceClientBase(
            ILogger logger,
            IHttpClientFactory clientFactory,
            IHttpPlatformHelper http_helper,
            IToast toast,
            IAuthHelper authHelper,
            IOptions <ICloudServiceSettings> options,
            IModelValidator validator) : base(logger, http_helper, clientFactory)
        {
            this.authHelper = authHelper;
            this.toast      = toast;
            settings        = options.Value;
            ApiBaseUrl      = string.IsNullOrWhiteSpace(settings.ApiBaseUrl)
                ? throw new ArgumentNullException(nameof(ApiBaseUrl)) : settings.ApiBaseUrl;
            connection = new ApiConnection(logger, this, http_helper, validator);

            #region SetClients

            Account     = new AccountClient(connection);
            Manage      = new ManageClient(connection);
            AuthMessage = new AuthMessageClient(connection);
            Version     = new VersionClient(connection);
            ActiveUser  = new ActiveUserClient(connection);
            Accelerate  = new AccelerateClient(connection);
            Script      = new ScriptClient(connection);

            #endregion
        }
Beispiel #2
0
 public GeneralHttpClientFactory(
     ILogger logger,
     IHttpPlatformHelper http_helper,
     IHttpClientFactory clientFactory)
 {
     this.logger      = logger;
     this.http_helper = http_helper;
     _clientFactory   = clientFactory;
 }
Beispiel #3
0
 public CloudServiceClient(
     ILoggerFactory loggerFactory,
     IHttpClientFactory clientFactory,
     IHttpPlatformHelper httpPlatformHelper,
     IUserManager userManager,
     IToast toast,
     IOptions <AppSettings> options,
     IModelValidator validator) : base(
         loggerFactory.CreateLogger(ClientName_),
         clientFactory,
         httpPlatformHelper,
         toast,
         userManager,
         options,
         validator)
 {
     this.userManager = userManager;
 }