From 716aca6779d90c54a0d9e18f51af6d2ab9892e33 Mon Sep 17 00:00:00 2001 From: Viswanatha Swamy Date: Thu, 17 Dec 2020 16:20:22 +0530 Subject: [PATCH] 1. remove unused using, 2. Reorganized the using, 3. Moved the class into separate file and 4. Added line and spacing formats (#1532) * Removed Unused Using and Reorganized the Using * Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API * Revert "Removed unused using, Reorganized using, moved the class to separate file, removed commented code in Catalog.API" This reverts commit 34241c430619b3b0bbeaabafa44c078c859237c4. * Removed unused using and reorganized the using inside "Services" folder * Removed Unused using and reoganized the using * Refactor Webhooks.API * Removed unused using and reorganized using inside Catalog.API --- .../AuthorizationHeaderParameterOperationFilter.cs | 1 - .../Basket/Basket.API/Controllers/BasketController.cs | 1 - src/Services/Basket/Basket.API/Grpc/BasketService.cs | 1 - .../Middlewares/ByPassAuthMiddleware.cs | 1 - src/Services/Basket/Basket.API/Startup.cs | 4 +--- .../Catalog.API/Extensions/CatalogItemExtensions.cs | 7 +------ .../Catalog/Catalog.API/Extensions/HostExtensions.cs | 7 ++----- .../Catalog.API/Extensions/WebHostExtensions.cs | 6 +++--- .../Catalog/Catalog.API/Grpc/CatalogService.cs | 11 +++++------ .../Catalog.API/Infrastructure/CatalogContext.cs | 4 ++-- .../CatalogIntegrationEventService.cs | 2 -- ...ngedToAwaitingValidationIntegrationEventHandler.cs | 10 +++++----- ...OrderStatusChangedToPaidIntegrationEventHandler.cs | 2 +- src/Services/Catalog/Catalog.API/Program.cs | 5 +---- src/Services/Catalog/Catalog.API/Startup.cs | 1 - .../Exceptions/WebhooksDomainException.cs | 3 --- .../Infrastructure/HttpGlobalExceptionFilter.cs | 4 ---- .../Webhooks.API/Infrastructure/WebhooksContext.cs | 4 ---- .../OrderStatusChangedToPaidIntegrationEvent.cs | 3 --- ...OrderStatusChangedToPaidIntegrationEventHandler.cs | 4 +--- .../OrderStatusChangedToShippedIntegrationEvent.cs | 4 ---- ...erStatusChangedToShippedIntegrationEventHandler.cs | 4 +--- .../ProductPriceChangedIntegrationEvent.cs | 4 ---- .../ProductPriceChangedIntegrationEventHandler.cs | 3 --- .../Webhooks/Webhooks.API/Model/WebhookData.cs | 3 --- .../Webhooks.API/Model/WebhookSubscription.cs | 3 --- .../Webhooks/Webhooks.API/Model/WebhookType.cs | 7 +------ src/Services/Webhooks/Webhooks.API/Program.cs | 7 +------ .../Webhooks.API/Services/IGrantUrlTesterService.cs | 5 +---- .../Webhooks.API/Services/IWebhooksRetriever.cs | 4 +--- .../Webhooks.API/Services/WebhooksRetriever.cs | 1 - .../Extensions/HttpClientExtensions.cs | 2 -- .../Middleware/AutoAuthorizeMiddleware.cs | 3 --- .../Services/Catalog/CatalogScenariosBase.cs | 5 ++--- .../Services/IntegrationEventsScenarios.cs | 5 ++--- .../Services/Location/LocationsScenariosBase.cs | 1 - .../Services/Location/LocationsTestsStartup.cs | 1 - .../Services/Marketing/CampaignScenariosBase.cs | 2 -- .../Services/Marketing/MarketingScenarios.cs | 9 +++------ .../Services/Marketing/MarketingScenariosBase.cs | 5 ++--- .../Services/Ordering/OrderingTestsStartup.cs | 4 ---- 41 files changed, 36 insertions(+), 127 deletions(-) diff --git a/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs b/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs index 7fe19bae3..3d505b4ee 100644 --- a/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs +++ b/src/Services/Basket/Basket.API/Auth/Server/AuthorizationHeaderParameterOperationFilter.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Mvc.Authorization; using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; using System.Collections.Generic; using System.Linq; diff --git a/src/Services/Basket/Basket.API/Controllers/BasketController.cs b/src/Services/Basket/Basket.API/Controllers/BasketController.cs index 9864e21e8..f51dbdb59 100644 --- a/src/Services/Basket/Basket.API/Controllers/BasketController.cs +++ b/src/Services/Basket/Basket.API/Controllers/BasketController.cs @@ -7,7 +7,6 @@ using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Basket.API.Services; using Microsoft.Extensions.Logging; using System; -using System.Linq; using System.Net; using System.Security.Claims; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/Grpc/BasketService.cs b/src/Services/Basket/Basket.API/Grpc/BasketService.cs index 830703b59..51633b326 100644 --- a/src/Services/Basket/Basket.API/Grpc/BasketService.cs +++ b/src/Services/Basket/Basket.API/Grpc/BasketService.cs @@ -4,7 +4,6 @@ using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; -using GrpcBasket; namespace GrpcBasket { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 2f5eb28b6..b3f42c14e 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index e8576b238..eb29c12ca 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -4,6 +4,7 @@ using Basket.API.Infrastructure.Filters; using Basket.API.Infrastructure.Middlewares; using Basket.API.IntegrationEvents.EventHandling; using Basket.API.IntegrationEvents.Events; +using GrpcBasket; using HealthChecks.UI.Client; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; @@ -33,9 +34,6 @@ using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; using System.IO; -using GrpcBasket; -using Microsoft.AspNetCore.Http.Features; -using Serilog; namespace Microsoft.eShopOnContainers.Services.Basket.API { diff --git a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs index fa2c3f60e..e953df581 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model { public static class CatalogItemExtensions { diff --git a/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs index cfa7e9d2f..ccdd73558 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs @@ -1,13 +1,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using System; using Microsoft.Extensions.DependencyInjection; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Polly; +using System; using System.Data.SqlClient; namespace Catalog.API.Extensions diff --git a/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs index b7a982b2e..07fc11770 100644 --- a/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs +++ b/src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs @@ -1,11 +1,11 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; -using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Polly; +using System; using System.Data.SqlClient; -using Microsoft.AspNetCore.Hosting; namespace Catalog.API.Extensions { diff --git a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs index ef22b5be2..e502780ee 100644 --- a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs +++ b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs @@ -1,16 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using CatalogApi; +using CatalogApi; using Grpc.Core; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using Microsoft.eShopOnContainers.Services.Catalog.API.Model; -using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using static CatalogApi.Catalog; namespace Catalog.API.Grpc diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs index 8cff66b08..cee4b5e33 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs @@ -1,9 +1,9 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using Microsoft.EntityFrameworkCore; using EntityConfigurations; - using Model; + using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; + using Model; public class CatalogContext : DbContext { diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs index 3e7ba9868..6c4839297 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Storage; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services; @@ -7,7 +6,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Utilities using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using Microsoft.Extensions.Logging; -using Serilog.Context; using System; using System.Data.Common; using System.Threading.Tasks; diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs index 493a271cc..d7da9951e 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs @@ -1,15 +1,15 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.EventHandling { using BuildingBlocks.EventBus.Abstractions; - using System.Threading.Tasks; using BuildingBlocks.EventBus.Events; - using Infrastructure; - using System.Collections.Generic; - using System.Linq; using global::Catalog.API.IntegrationEvents; + using Infrastructure; using IntegrationEvents.Events; - using Serilog.Context; using Microsoft.Extensions.Logging; + using Serilog.Context; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; public class OrderStatusChangedToAwaitingValidationIntegrationEventHandler : IIntegrationEventHandler diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs index 7d383254f..1a8836186 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs @@ -1,11 +1,11 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.EventHandling { using BuildingBlocks.EventBus.Abstractions; - using System.Threading.Tasks; using Infrastructure; using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events; using Microsoft.Extensions.Logging; using Serilog.Context; + using System.Threading.Tasks; public class OrderStatusChangedToPaidIntegrationEventHandler : IIntegrationEventHandler diff --git a/src/Services/Catalog/Catalog.API/Program.cs b/src/Services/Catalog/Catalog.API/Program.cs index 3632609b4..b737d0142 100644 --- a/src/Services/Catalog/Catalog.API/Program.cs +++ b/src/Services/Catalog/Catalog.API/Program.cs @@ -1,5 +1,4 @@ -using Autofac.Extensions.DependencyInjection; -using Catalog.API.Extensions; +using Catalog.API.Extensions; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Server.Kestrel.Core; @@ -12,9 +11,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Serilog; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Net; namespace Microsoft.eShopOnContainers.Services.Catalog.API diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 836b6a7b8..2b7082e25 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.ServiceBus; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; diff --git a/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs b/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs index 8d4024583..6307a6296 100644 --- a/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs +++ b/src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Exceptions { diff --git a/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs b/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs index 44cc9547a..7bb818879 100644 --- a/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs +++ b/src/Services/Webhooks/Webhooks.API/Infrastructure/HttpGlobalExceptionFilter.cs @@ -4,11 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Threading.Tasks; using Webhooks.API.Exceptions; using Webhooks.API.Infrastructure.ActionResult; diff --git a/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs b/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs index 88769bc53..f5b9fbf34 100644 --- a/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs +++ b/src/Services/Webhooks/Webhooks.API/Infrastructure/WebhooksContext.cs @@ -1,9 +1,5 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Webhooks.API.Model; namespace Webhooks.API.Infrastructure diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs index c4adda56e..256d60d5a 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEvent.cs @@ -1,8 +1,5 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs index 0b118bb61..5b59c9401 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToPaidIntegrationEventHandler.cs @@ -1,11 +1,9 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; +using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; using Webhooks.API.Model; using Webhooks.API.Services; -using Microsoft.Extensions.Logging; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs index 10693eb8b..0e678835c 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEvent.cs @@ -1,8 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs index 9e2325d91..9981d97bd 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/OrderStatusChangedToShippedIntegrationEventHandler.cs @@ -1,11 +1,9 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; +using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; using Webhooks.API.Model; using Webhooks.API.Services; -using Microsoft.Extensions.Logging; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs index 18821f9fc..39fba6426 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEvent.cs @@ -1,8 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents { diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs index 10e1542c8..044ce3bd3 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs @@ -1,7 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Webhooks.API.IntegrationEvents diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs index ecf17c65d..e0ec8caab 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs @@ -1,8 +1,5 @@ using Newtonsoft.Json; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Model { diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs index 1b2eb48fe..72d726834 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Webhooks.API.Model { diff --git a/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs b/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs index eceb15913..cda3d7316 100644 --- a/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs +++ b/src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Webhooks.API.Model +namespace Webhooks.API.Model { public enum WebhookType { diff --git a/src/Services/Webhooks/Webhooks.API/Program.cs b/src/Services/Webhooks/Webhooks.API/Program.cs index b08a1c2da..590d2b335 100644 --- a/src/Services/Webhooks/Webhooks.API/Program.cs +++ b/src/Services/Webhooks/Webhooks.API/Program.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; diff --git a/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs b/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs index c78475fb0..c69e41934 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; namespace Webhooks.API.Services { diff --git a/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs b/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs index ed75cfc64..0ae20f03b 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Threading.Tasks; using Webhooks.API.Model; diff --git a/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs b/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs index 7caa76220..1f7fb3f1c 100644 --- a/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs +++ b/src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs b/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs index a41ffd3a2..25475462d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs +++ b/src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs @@ -1,8 +1,6 @@ using Microsoft.AspNetCore.TestHost; using System; -using System.Collections.Generic; using System.Net.Http; -using System.Text; namespace FunctionalTests.Extensions { diff --git a/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs b/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs index 65206db4f..bce9cc751 100644 --- a/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs +++ b/src/Tests/Services/Application.FunctionalTests/Middleware/AutoAuthorizeMiddleware.cs @@ -1,8 +1,5 @@ using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; using System.Security.Claims; -using System.Text; using System.Threading.Tasks; namespace FunctionalTests.Middleware diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs index ffaef64a3..96d625b72 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Catalog/CatalogScenariosBase.cs @@ -1,15 +1,14 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; using Microsoft.eShopOnContainers.Services.Catalog.API; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System.IO; using System.Reflection; -using Microsoft.Extensions.Configuration; namespace FunctionalTests.Services.Catalog { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs index dd6eef99a..ff06ad78f 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/IntegrationEventsScenarios.cs @@ -5,13 +5,12 @@ using Microsoft.eShopOnContainers.Services.Catalog.API.Model; using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; using Newtonsoft.Json; using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; using Xunit; -using System.Net.Http; -using System.Threading; namespace FunctionalTests.Services { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs index 4c3bd1b29..7c340ce5e 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsScenariosBase.cs @@ -1,6 +1,5 @@ namespace FunctionalTests.Services.Locations { - using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.Configuration; diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs index 709c4e7eb..b86d72041 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs @@ -1,7 +1,6 @@ namespace FunctionalTests.Services.Locations { using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.eShopOnContainers.Services.Locations.API; using Microsoft.Extensions.Configuration; diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs index ab21dccba..447067dd4 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/CampaignScenariosBase.cs @@ -1,7 +1,5 @@ namespace FunctionalTests.Services.Marketing { - using System; - public class CampaignScenariosBase : MarketingScenariosBase { public static class Get diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs index 4c808565b..b0ecfd725 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenarios.cs @@ -1,17 +1,14 @@ namespace FunctionalTests.Services.Marketing { - using UserLocation = Microsoft.eShopOnContainers.Services.Locations.API.Model.UserLocation; - using LocationRequest = Microsoft.eShopOnContainers.Services.Locations.API.ViewModel.LocationRequest; using FunctionalTests.Services.Locations; + using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; using Newtonsoft.Json; - using System; + using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Xunit; - using System.Collections.Generic; - using Microsoft.eShopOnContainers.Services.Marketing.API.Dto; - using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; + using LocationRequest = Microsoft.eShopOnContainers.Services.Locations.API.ViewModel.LocationRequest; public class MarketingScenarios : MarketingScenariosBase { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs index 63b9214b2..9a70c875d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingScenariosBase.cs @@ -1,12 +1,11 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System.IO; using System.Reflection; -using Microsoft.Extensions.Configuration; namespace FunctionalTests.Services.Marketing { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs index 46e5fe8c1..02a14759e 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Ordering/OrderingTestsStartup.cs @@ -1,11 +1,7 @@ using FunctionalTests.Middleware; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; using Microsoft.eShopOnContainers.Services.Ordering.API; using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; -using System.Text; namespace FunctionalTests.Services.Ordering {