Exemplo n.º 1
0
        public WorkshopManagementAPI(IConfiguration config)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("WorkshopManagementAPI");
            string baseUri        = $"http://{apiHostAndPort}/api";

            _client = RestService.For <IWorkshopManagementAPI>(baseUri);
        }
Exemplo n.º 2
0
        public WorkshopManagementAPI(IConfiguration config, HttpClient httpClient)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("WorkshopManagementAPI");

            httpClient.BaseAddress = new Uri($"http://{apiHostAndPort}/api");
            _restClient            = RestService.For <IWorkshopManagementAPI>(httpClient);
        }
Exemplo n.º 3
0
        public WorkshopManagementAPI(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 <IWorkshopManagementAPI>(httpClient);
        }
Exemplo n.º 4
0
        public WorkshopManagementAPI(IHostingEnvironment env)
        {
            string apiHost = env.IsDevelopment() ? "localhost" : "apigateway";
            int    apiPort = 10000;
            string baseUri = $"http://{apiHost}:{apiPort}/api";

            _client = RestService.For <IWorkshopManagementAPI>(baseUri);
        }
 public WorkshopManagementController(ILogger <WorkshopManagementController> logger,
                                     ICustomerManagementAPI customerAPI,
                                     IVehicleManagementAPI vehicleAPI,
                                     IWorkshopManagementAPI workshopAPI)
 {
     _logger      = logger;
     _customerAPI = customerAPI;
     _vehicleAPI  = vehicleAPI;
     _workshopAPI = workshopAPI;
     this._policy = GetRetryPolicy();;
 }
Exemplo n.º 6
0
        public WorkshopManagementAPI(IConfiguration config, HttpClient httpClient)
        {
            string apiHostAndPort = config.GetSection("APIServiceLocations").GetValue <string>("WorkshopManagementAPI");

            httpClient.BaseAddress = new Uri($"http://{apiHostAndPort}/api");
            _restClient            = RestService.For <IWorkshopManagementAPI>(
                httpClient,
                new RefitSettings
            {
                ContentSerializer = new NewtonsoftJsonContentSerializer()
            });
        }
 public WorkshopManagementController(IWorkshopManagementAPI workshopManagamentAPI, ILogger <WorkshopManagementController> logger)
 {
     _workshopManagementAPI = workshopManagamentAPI;
     _logger           = logger;
     _resiliencyHelper = new ResiliencyHelper(_logger);
 }
 public WorkshopManagementController(IWorkshopManagementAPI workshopManagamentAPI, ILogger <WorkshopManagementController> logger)
 {
     _workshopManagementAPI = workshopManagamentAPI;
     _logger = logger;
 }
 public InventoryManagementController(IWorkshopManagementAPI workshopManagementAPI, IInventoryManagementAPI inventoryManagementAPI, ILogger <InventoryManagementController> logger)
 {
     this.workshopManagementAPI  = workshopManagementAPI;
     this.inventoryManagementAPI = inventoryManagementAPI;
     resiliencyHelper            = new ResiliencyHelper(logger);
 }