started moving api layer to shared abstract class
This commit is contained in:
18
Shared/APIService.cs
Normal file
18
Shared/APIService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
namespace Shared
|
||||
{
|
||||
public abstract class APIService
|
||||
{
|
||||
protected ILogger Logger { get; set; }
|
||||
protected HttpClient Client { get; set; }
|
||||
|
||||
protected APIService(ILogger logger, HttpClient httpClient)
|
||||
{
|
||||
Logger = logger;
|
||||
Client = httpClient ?? new HttpClient();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user