Browse Source

Swamy/remove unused usings and reorganize usings (#489)

* Removed and Reordered the using statements

* Removed and Reordered the usings inside Web Project

* Removed and Reordered the usings inside PublicApi project

* Removed Unused usings and reorganized usings inside Infrastructure project
main
Viswanatha Swamy 5 years ago
committed by GitHub
parent
commit
1598d0bbe1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/Infrastructure/Data/OrderRepository.cs
  2. 1
      src/PublicApi/Program.cs
  3. 6
      src/PublicApi/Startup.cs
  4. 9
      src/Web/Areas/Identity/IdentityHostingStartup.cs
  5. 6
      src/Web/Controllers/FileController.cs
  6. 1
      src/Web/Controllers/OrderController.cs
  7. 8
      src/Web/Controllers/UserController.cs
  8. 1
      src/Web/Program.cs
  9. 8
      src/Web/Services/CachedCatalogViewModelService.cs
  10. 14
      src/Web/Startup.cs
  11. 7
      src/Web/ViewModels/File/FileViewModel.cs
  12. 4
      src/Web/Views/Manage/ManageNavPages.cs
  13. 1
      tests/FunctionalTests/PublicApi/ApiTokenHelper.cs
  14. 6
      tests/IntegrationTests/Repositories/BasketRepositoryTests/SetQuantities.cs
  15. 8
      tests/IntegrationTests/Repositories/OrderRepositoryTests/GetById.cs
  16. 4
      tests/UnitTests/ApplicationCore/Entities/CatalogItemTests/UpdateDetails.cs
  17. 2
      tests/UnitTests/ApplicationCore/Entities/OrderTests/OrderTotal.cs
  18. 6
      tests/UnitTests/ApplicationCore/Services/BasketServiceTests/SetQuantities.cs
  19. 6
      tests/UnitTests/ApplicationCore/Specifications/BasketWithItemsSpecification.cs

5
src/Infrastructure/Data/OrderRepository.cs

@ -1,8 +1,7 @@
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks; using System.Threading.Tasks;
using Ardalis.Specification;
namespace Microsoft.eShopWeb.Infrastructure.Data namespace Microsoft.eShopWeb.Infrastructure.Data
{ {

1
src/PublicApi/Program.cs

@ -7,7 +7,6 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
namespace Microsoft.eShopWeb.PublicApi namespace Microsoft.eShopWeb.PublicApi
{ {

6
src/PublicApi/Startup.cs

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using AutoMapper; using AutoMapper;
using BlazorShared; using BlazorShared;
using BlazorShared.Authorization;
using MediatR; using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
@ -23,6 +19,8 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.eShopWeb.PublicApi namespace Microsoft.eShopWeb.PublicApi
{ {

9
src/Web/Areas/Identity/IdentityHostingStartup.cs

@ -1,11 +1,4 @@
using System; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
[assembly: HostingStartup(typeof(Microsoft.eShopWeb.Web.Areas.Identity.IdentityHostingStartup))] [assembly: HostingStartup(typeof(Microsoft.eShopWeb.Web.Areas.Identity.IdentityHostingStartup))]
namespace Microsoft.eShopWeb.Web.Areas.Identity namespace Microsoft.eShopWeb.Web.Areas.Identity

6
src/Web/Controllers/FileController.cs

@ -1,8 +1,8 @@
using System; using Microsoft.AspNetCore.Authorization;
using System.IO;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.Web.ViewModels.File; using Microsoft.eShopWeb.Web.ViewModels.File;
using System;
using System.IO;
namespace Microsoft.eShopWeb.Web.Controllers namespace Microsoft.eShopWeb.Web.Controllers
{ {

1
src/Web/Controllers/OrderController.cs

@ -1,5 +1,4 @@
using MediatR; using MediatR;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.Web.Features.MyOrders; using Microsoft.eShopWeb.Web.Features.MyOrders;

8
src/Web/Controllers/UserController.cs

@ -1,10 +1,10 @@
using System.Collections.Generic; using BlazorShared.Authorization;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using BlazorShared.Authorization;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Web.Controllers namespace Microsoft.eShopWeb.Web.Controllers

1
src/Web/Program.cs

@ -7,7 +7,6 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
namespace Microsoft.eShopWeb.Web namespace Microsoft.eShopWeb.Web
{ {

8
src/Web/Services/CachedCatalogViewModelService.cs

@ -1,9 +1,9 @@
using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Rendering;
using System.Threading.Tasks; using Microsoft.eShopWeb.Web.Extensions;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.Web.ViewModels; using Microsoft.eShopWeb.Web.ViewModels;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using Microsoft.eShopWeb.Web.Extensions; using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Web.Services namespace Microsoft.eShopWeb.Web.Services
{ {

14
src/Web/Startup.cs

@ -1,11 +1,18 @@
using Ardalis.ListStartupServices; using Ardalis.ListStartupServices;
using BlazorAdmin;
using BlazorAdmin.Services;
using Blazored.LocalStorage;
using BlazorShared;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Data; using Microsoft.eShopWeb.Infrastructure.Data;
using Microsoft.eShopWeb.Infrastructure.Identity; using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.eShopWeb.Web.Configuration; using Microsoft.eShopWeb.Web.Configuration;
@ -19,13 +26,6 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Net.Mime; using System.Net.Mime;
using BlazorAdmin;
using BlazorAdmin.Services;
using Blazored.LocalStorage;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using BlazorShared;
namespace Microsoft.eShopWeb.Web namespace Microsoft.eShopWeb.Web
{ {

7
src/Web/ViewModels/File/FileViewModel.cs

@ -1,9 +1,4 @@
using System; namespace Microsoft.eShopWeb.Web.ViewModels.File
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Web.ViewModels.File
{ {
public class FileViewModel public class FileViewModel
{ {

4
src/Web/Views/Manage/ManageNavPages.cs

@ -1,6 +1,6 @@
using System; using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
using System;
namespace Microsoft.eShopWeb.Web.Views.Manage namespace Microsoft.eShopWeb.Web.Views.Manage
{ {

1
tests/FunctionalTests/PublicApi/ApiTokenHelper.cs

@ -1,5 +1,4 @@
using Microsoft.eShopWeb.ApplicationCore.Constants; using Microsoft.eShopWeb.ApplicationCore.Constants;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

6
tests/IntegrationTests/Repositories/BasketRepositoryTests/SetQuantities.cs

@ -1,11 +1,11 @@
using System.Collections.Generic; using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate; using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Services; using Microsoft.eShopWeb.ApplicationCore.Services;
using Microsoft.eShopWeb.Infrastructure.Data; using Microsoft.eShopWeb.Infrastructure.Data;
using Microsoft.eShopWeb.UnitTests.Builders; using Microsoft.eShopWeb.UnitTests.Builders;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xunit; using Xunit;
namespace Microsoft.eShopWeb.IntegrationTests.Repositories.BasketRepositoryTests namespace Microsoft.eShopWeb.IntegrationTests.Repositories.BasketRepositoryTests

8
tests/IntegrationTests/Repositories/OrderRepositoryTests/GetById.cs

@ -1,10 +1,10 @@
using Microsoft.eShopWeb.Infrastructure.Data; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore; using Microsoft.eShopWeb.Infrastructure.Data;
using System.Linq;
using Microsoft.eShopWeb.UnitTests.Builders; using Microsoft.eShopWeb.UnitTests.Builders;
using System.Linq;
using System.Threading.Tasks;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.IntegrationTests.Repositories.OrderRepositoryTests namespace Microsoft.eShopWeb.IntegrationTests.Repositories.OrderRepositoryTests
{ {

4
tests/UnitTests/ApplicationCore/Entities/CatalogItemTests/UpdateDetails.cs

@ -1,6 +1,6 @@
using Xunit; using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System; using System;
using Xunit;
namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Entities.CatalogItemTests namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Entities.CatalogItemTests
{ {

2
tests/UnitTests/ApplicationCore/Entities/OrderTests/OrderTotal.cs

@ -1,6 +1,6 @@
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using System.Collections.Generic;
using Microsoft.eShopWeb.UnitTests.Builders; using Microsoft.eShopWeb.UnitTests.Builders;
using System.Collections.Generic;
using Xunit; using Xunit;
namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Entities.OrderTests namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Entities.OrderTests

6
tests/UnitTests/ApplicationCore/Services/BasketServiceTests/SetQuantities.cs

@ -1,11 +1,11 @@
using Microsoft.eShopWeb.ApplicationCore.Exceptions; using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Microsoft.eShopWeb.ApplicationCore.Exceptions;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Services; using Microsoft.eShopWeb.ApplicationCore.Services;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Moq; using Moq;
using System; using System;
using Xunit;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit;
namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTests namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Services.BasketServiceTests
{ {

6
tests/UnitTests/ApplicationCore/Specifications/BasketWithItemsSpecification.cs

@ -1,10 +1,10 @@
using Microsoft.eShopWeb.ApplicationCore.Specifications; using Ardalis.Specification.EntityFrameworkCore;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate; using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Microsoft.eShopWeb.ApplicationCore.Specifications;
using Moq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Xunit; using Xunit;
using Moq;
using Ardalis.Specification.EntityFrameworkCore;
namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Specifications namespace Microsoft.eShopWeb.UnitTests.ApplicationCore.Specifications
{ {

Loading…
Cancel
Save