diff --git a/src/PublicApi/AuthEndpoints/Authenticate.cs b/src/PublicApi/AuthEndpoints/Authenticate.cs index 605c4bf..d542f60 100644 --- a/src/PublicApi/AuthEndpoints/Authenticate.cs +++ b/src/PublicApi/AuthEndpoints/Authenticate.cs @@ -1,16 +1,10 @@ using Ardalis.ApiEndpoints; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopWeb.ApplicationCore.Constants; -using Microsoft.eShopWeb.ApplicationCore.Entities; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.Infrastructure.Identity; -using Microsoft.IdentityModel.Tokens; using Swashbuckle.AspNetCore.Annotations; -using System; -using System.IdentityModel.Tokens.Jwt; -using System.Security.Claims; -using System.Text; +using System.Threading; using System.Threading.Tasks; namespace Microsoft.eShopWeb.PublicApi.AuthEndpoints @@ -34,7 +28,7 @@ namespace Microsoft.eShopWeb.PublicApi.AuthEndpoints OperationId = "auth.authenticate", Tags = new[] { "AuthEndpoints" }) ] - public override async Task> HandleAsync(AuthenticateRequest request) + public override async Task> HandleAsync(AuthenticateRequest request, CancellationToken cancellationToken) { var response = new AuthenticateResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogBrandEndpoints/List.cs b/src/PublicApi/CatalogBrandEndpoints/List.cs index 8fa15ea..40eeef0 100644 --- a/src/PublicApi/CatalogBrandEndpoints/List.cs +++ b/src/PublicApi/CatalogBrandEndpoints/List.cs @@ -5,6 +5,7 @@ using Microsoft.eShopWeb.ApplicationCore.Entities; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Swashbuckle.AspNetCore.Annotations; using System.Linq; +using System.Threading; using System.Threading.Tasks; namespace Microsoft.eShopWeb.PublicApi.CatalogBrandEndpoints @@ -28,7 +29,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogBrandEndpoints OperationId = "catalog-brands.List", Tags = new[] { "CatalogBrandEndpoints" }) ] - public override async Task> HandleAsync() + public override async Task> HandleAsync(CancellationToken cancellationToken) { var response = new ListCatalogBrandsResponse(); diff --git a/src/PublicApi/CatalogItemEndpoints/Create.cs b/src/PublicApi/CatalogItemEndpoints/Create.cs index 4b946b8..559358b 100644 --- a/src/PublicApi/CatalogItemEndpoints/Create.cs +++ b/src/PublicApi/CatalogItemEndpoints/Create.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Threading; using Ardalis.ApiEndpoints; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; @@ -32,7 +33,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints OperationId = "catalog-items.create", Tags = new[] { "CatalogItemEndpoints" }) ] - public override async Task> HandleAsync(CreateCatalogItemRequest request) + public override async Task> HandleAsync(CreateCatalogItemRequest request, CancellationToken cancellationToken) { var response = new CreateCatalogItemResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogItemEndpoints/Delete.cs b/src/PublicApi/CatalogItemEndpoints/Delete.cs index 010e06a..654ba4a 100644 --- a/src/PublicApi/CatalogItemEndpoints/Delete.cs +++ b/src/PublicApi/CatalogItemEndpoints/Delete.cs @@ -1,4 +1,5 @@ -using Ardalis.ApiEndpoints; +using System.Threading; +using Ardalis.ApiEndpoints; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -27,7 +28,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints OperationId = "catalog-items.Delete", Tags = new[] { "CatalogItemEndpoints" }) ] - public override async Task> HandleAsync([FromRoute]DeleteCatalogItemRequest request) + public override async Task> HandleAsync([FromRoute]DeleteCatalogItemRequest request, CancellationToken cancellationToken) { var response = new DeleteCatalogItemResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogItemEndpoints/GetById.cs b/src/PublicApi/CatalogItemEndpoints/GetById.cs index a92c89e..3a0f62f 100644 --- a/src/PublicApi/CatalogItemEndpoints/GetById.cs +++ b/src/PublicApi/CatalogItemEndpoints/GetById.cs @@ -1,4 +1,5 @@ -using Ardalis.ApiEndpoints; +using System.Threading; +using Ardalis.ApiEndpoints; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopWeb.ApplicationCore.Entities; using Microsoft.eShopWeb.ApplicationCore.Interfaces; @@ -25,7 +26,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints OperationId = "catalog-items.GetById", Tags = new[] { "CatalogItemEndpoints" }) ] - public override async Task> HandleAsync([FromRoute] GetByIdCatalogItemRequest request) + public override async Task> HandleAsync([FromRoute] GetByIdCatalogItemRequest request, CancellationToken cancellationToken) { var response = new GetByIdCatalogItemResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogItemEndpoints/ListPaged.cs b/src/PublicApi/CatalogItemEndpoints/ListPaged.cs index 0cd916e..a67d681 100644 --- a/src/PublicApi/CatalogItemEndpoints/ListPaged.cs +++ b/src/PublicApi/CatalogItemEndpoints/ListPaged.cs @@ -7,6 +7,7 @@ using Microsoft.eShopWeb.ApplicationCore.Specifications; using Swashbuckle.AspNetCore.Annotations; using System; using System.Linq; +using System.Threading; using System.Threading.Tasks; namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints @@ -33,7 +34,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints OperationId = "catalog-items.ListPaged", Tags = new[] { "CatalogItemEndpoints" }) ] - public override async Task> HandleAsync([FromQuery]ListPagedCatalogItemRequest request) + public override async Task> HandleAsync([FromQuery]ListPagedCatalogItemRequest request, CancellationToken cancellationToken) { var response = new ListPagedCatalogItemResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogItemEndpoints/Update.cs b/src/PublicApi/CatalogItemEndpoints/Update.cs index 6abbbfc..c93ce91 100644 --- a/src/PublicApi/CatalogItemEndpoints/Update.cs +++ b/src/PublicApi/CatalogItemEndpoints/Update.cs @@ -6,6 +6,7 @@ using Microsoft.eShopWeb.ApplicationCore.Entities; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Swashbuckle.AspNetCore.Annotations; using System.IO; +using System.Threading; using System.Threading.Tasks; namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints @@ -32,7 +33,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints OperationId = "catalog-items.update", Tags = new[] { "CatalogItemEndpoints" }) ] - public override async Task> HandleAsync(UpdateCatalogItemRequest request) + public override async Task> HandleAsync(UpdateCatalogItemRequest request, CancellationToken cancellationToken) { var response = new UpdateCatalogItemResponse(request.CorrelationId()); diff --git a/src/PublicApi/CatalogTypeEndpoints/List.cs b/src/PublicApi/CatalogTypeEndpoints/List.cs index 616ca4e..f13366a 100644 --- a/src/PublicApi/CatalogTypeEndpoints/List.cs +++ b/src/PublicApi/CatalogTypeEndpoints/List.cs @@ -5,6 +5,7 @@ using Microsoft.eShopWeb.ApplicationCore.Entities; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Swashbuckle.AspNetCore.Annotations; using System.Linq; +using System.Threading; using System.Threading.Tasks; namespace Microsoft.eShopWeb.PublicApi.CatalogTypeEndpoints @@ -28,7 +29,7 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogTypeEndpoints OperationId = "catalog-types.List", Tags = new[] { "CatalogTypeEndpoints" }) ] - public override async Task> HandleAsync() + public override async Task> HandleAsync(CancellationToken cancellationToken) { var response = new ListCatalogTypesResponse(); diff --git a/src/PublicApi/PublicApi.csproj b/src/PublicApi/PublicApi.csproj index 699cdec..52c1c65 100644 --- a/src/PublicApi/PublicApi.csproj +++ b/src/PublicApi/PublicApi.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index 0f44a06..64d50e2 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -20,7 +20,7 @@ - +