示例#1
0
 public VehicleManagementController(IVehicleManagementAPI vehicleManagementAPI,
                                    ICustomerManagementAPI customerManagementAPI, ILogger <VehicleManagementController> logger)
 {
     _vehicleManagementAPI  = vehicleManagementAPI;
     _customerManagementAPI = customerManagementAPI;
     _logger = logger;
 }
        public CustomerManagementAPI(IConfiguration config, HttpClient httpClient)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("CustomerManagementAPI");

            httpClient.BaseAddress = new Uri($"http://{apiHostAndPort}/api");
            _restClient            = RestService.For <ICustomerManagementAPI>(httpClient);
        }
示例#3
0
        public CustomerManagementAPI(IConfiguration config)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("CustomerManagementAPI");
            string baseUri        = $"http://{apiHostAndPort}/api";

            _client = RestService.For <ICustomerManagementAPI>(baseUri);
        }
示例#4
0
 public VehicleManagementController(IVehicleManagementAPI vehicleManagementAPI,
                                    ICustomerManagementAPI customerManagementAPI, ILogger <VehicleManagementController> logger)
 {
     _vehicleManagementAPI  = vehicleManagementAPI;
     _customerManagementAPI = customerManagementAPI;
     _logger           = logger;
     _resiliencyHelper = new ResiliencyHelper(_logger);
 }
示例#5
0
        public CustomerManagementAPI(IHostingEnvironment env)
        {
            string apiHost = env.IsDevelopment() ? "localhost" : "apigateway";
            int    apiPort = 10000;
            string baseUri = $"http://{apiHost}:{apiPort}/api";

            _client = RestService.For <ICustomerManagementAPI>(baseUri);
        }
        public CustomerManagementAPI(IHostingEnvironment env, HttpClient httpClient)
        {
            string apiHost = env.IsDevelopment() ? "localhost" : "apigateway";
            int    apiPort = 10000;

            httpClient.BaseAddress = new System.Uri($"http://{apiHost}:{apiPort}/api");
            _client = RestService.For <ICustomerManagementAPI>(httpClient);
        }
 public WorkshopManagementController(ILogger <WorkshopManagementController> logger,
                                     ICustomerManagementAPI customerAPI,
                                     IVehicleManagementAPI vehicleAPI,
                                     IWorkshopManagementAPI workshopAPI)
 {
     _logger      = logger;
     _customerAPI = customerAPI;
     _vehicleAPI  = vehicleAPI;
     _workshopAPI = workshopAPI;
     this._policy = GetRetryPolicy();;
 }
示例#8
0
        public CustomerManagementAPI(IConfiguration config, HttpClient httpClient)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("CustomerManagementAPI");

            httpClient.BaseAddress = new Uri($"http://{apiHostAndPort}/api");
            _restClient            = RestService.For <ICustomerManagementAPI>(
                httpClient,
                new RefitSettings
            {
                ContentSerializer = new NewtonsoftJsonContentSerializer()
            });
        }
 public CustomerManagementController(ICustomerManagementAPI customerManagementAPI, ILogger <CustomerManagementController> logger)
 {
     _customerManagementAPI = customerManagementAPI;
     _logger           = logger;
     _resiliencyHelper = new ResiliencyHelper(_logger);
 }
示例#10
0
 public CustomerManagementController(ICustomerManagementAPI customerManagementAPI, ILogger <CustomerManagementController> logger)
 {
     _customerManagementAPI = customerManagementAPI;
     _logger = logger;
 }