public BaseService(TokenAuthenticationStateProvider tokenAuthenticationStateProvider)
        {
            _tokenAuthenticationStateProvider = tokenAuthenticationStateProvider;

            ApiClient             = new HttpClient();
            ApiClient.BaseAddress = new Uri("http://localhost:5001/api/");
            ApiClient.DefaultRequestHeaders.Accept.Clear();
            ApiClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        }
 public CategoryService(TokenAuthenticationStateProvider tokenAuthenticationStateProvider)
     : base(tokenAuthenticationStateProvider)
 {
 }
Exemple #3
0
 public UserInfoService(TokenAuthenticationStateProvider tokenAuthenticationStateProvider)
     : base(tokenAuthenticationStateProvider)
 {
 }
Exemple #4
0
 // register service as addScoped @Startup.cs
 // scoped means
 public ProductService(TokenAuthenticationStateProvider tokenAuthenticationStateProvider)
     : base(tokenAuthenticationStateProvider)
 {
 }