Compare commits

...

1 Commits

Author SHA1 Message Date
  David Fowler 493031b11c Added implict usings 1 year ago
38 changed files with 126 additions and 250 deletions
Split View
  1. +3
    -14
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/GlobalUsings.cs
  2. +1
    -17
      src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj
  3. +1
    -15
      src/ApiGateways/Web.Bff.Shopping/aggregator/GlobalUsings.cs
  4. +1
    -0
      src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj
  5. +1
    -0
      src/BuildingBlocks/EventBus/EventBus/EventBus.csproj
  6. +2
    -6
      src/BuildingBlocks/EventBus/EventBus/GlobalUsings.cs
  7. +1
    -0
      src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj
  8. +8
    -11
      src/BuildingBlocks/EventBus/EventBusRabbitMQ/GlobalUsings.cs
  9. +1
    -0
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj
  10. +5
    -7
      src/BuildingBlocks/EventBus/EventBusServiceBus/GlobalUsings.cs
  11. +6
    -10
      src/BuildingBlocks/EventBus/IntegrationEventLogEF/GlobalUsings.cs
  12. +1
    -0
      src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj
  13. +5
    -13
      src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj
  14. +54
    -56
      src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs
  15. +1
    -0
      src/Services/Basket/Basket.API/Basket.API.csproj
  16. +1
    -10
      src/Services/Basket/Basket.API/GlobalUsings.cs
  17. +1
    -0
      src/Services/Catalog/Catalog.API/Catalog.API.csproj
  18. +2
    -13
      src/Services/Catalog/Catalog.API/GlobalUsings.cs
  19. +1
    -0
      src/Services/Identity/Identity.API/Identity.API.csproj
  20. +1
    -13
      src/Services/Ordering/Ordering.API/GlobalUsings.cs
  21. +1
    -0
      src/Services/Ordering/Ordering.API/Ordering.API.csproj
  22. +1
    -3
      src/Services/Ordering/Ordering.BackgroundTasks/GlobalUsings.cs
  23. +1
    -0
      src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj
  24. +3
    -8
      src/Services/Ordering/Ordering.Domain/GlobalUsings.cs
  25. +1
    -0
      src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj
  26. +5
    -10
      src/Services/Ordering/Ordering.Infrastructure/GlobalUsings.cs
  27. +1
    -0
      src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj
  28. +1
    -8
      src/Services/Ordering/Ordering.SignalrHub/GlobalUsings.cs
  29. +1
    -0
      src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj
  30. +1
    -5
      src/Services/Payment/Payment.API/GlobalUsings.cs
  31. +1
    -0
      src/Services/Payment/Payment.API/Payment.API.csproj
  32. +1
    -11
      src/Services/Webhooks/Webhooks.API/GlobalUsings.cs
  33. +1
    -0
      src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj
  34. +5
    -5
      src/Tests/Services/Application.FunctionalTests/GlobalUsings.cs
  35. +1
    -0
      src/Web/WebMVC/WebMVC.csproj
  36. +2
    -10
      src/Web/WebStatus/GlobalUsings.cs
  37. +1
    -1
      src/Web/WebStatus/WebStatus.csproj
  38. +1
    -4
      src/Web/WebhookClient/WebhookClient.csproj

+ 3
- 14
src/ApiGateways/Mobile.Bff.Shopping/aggregator/GlobalUsings.cs View File

@ -1,24 +1,13 @@
global using CatalogApi;
global using Grpc.Core.Interceptors;
global using System.Text.Json;
global using CatalogApi;
global using Grpc.Core;
global using Grpc.Core.Interceptors;
global using GrpcBasket;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Infrastructure;
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using System.Collections.Generic;
global using System.Linq;
global using System.Net.Http;
global using System.Net;
global using System.Text.Json;
global using System.Threading.Tasks;
global using System;
global using Services.Common;

+ 1
- 17
src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj View File

@ -5,31 +5,15 @@
<AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName>
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Yarp.ReverseProxy" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.AspNetCore.Server.ClientFactory" />
<PackageReference Include="Grpc.Core" />
<PackageReference Include="Grpc.Net.ClientFactory" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<PackageReference Include="Swashbuckle.AspNetCore" />
</ItemGroup>
<ItemGroup>


+ 1
- 15
src/ApiGateways/Web.Bff.Shopping/aggregator/GlobalUsings.cs View File

@ -1,27 +1,13 @@
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Net;
global using System.Net.Http;
global using System.Net.Http.Headers;
global using System.Text.Json;
global using System.Threading;
global using System.Threading.Tasks;
global using System.Text.Json;
global using CatalogApi;
global using Grpc.Core;
global using Grpc.Core.Interceptors;
global using GrpcBasket;
global using Microsoft.AspNetCore.Authentication;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure;
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Services.Common;

+ 1
- 0
src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj View File

@ -4,6 +4,7 @@
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Web.Shopping.HttpAggregator</AssemblyName>
<RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>


+ 1
- 0
src/BuildingBlocks/EventBus/EventBus/EventBus.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBus</RootNamespace>
</PropertyGroup>


+ 2
- 6
src/BuildingBlocks/EventBus/EventBus/GlobalUsings.cs View File

@ -1,8 +1,4 @@
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using System.Text.Json.Serialization;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using static Microsoft.eShopOnContainers.BuildingBlocks.EventBus.InMemoryEventBusSubscriptionsManager;
global using System.Collections.Generic;
global using System.Linq;
global using System.Text.Json.Serialization;
global using System.Threading.Tasks;
global using System;

+ 1
- 0
src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ</RootNamespace>
</PropertyGroup>


+ 8
- 11
src/BuildingBlocks/EventBus/EventBusRabbitMQ/GlobalUsings.cs View File

@ -1,16 +1,13 @@
global using Microsoft.Extensions.Logging;
global using System.Net.Sockets;
global using System.Text;
global using System.Text.Json;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions;
global using Microsoft.Extensions.Logging;
global using Polly;
global using Polly.Retry;
global using RabbitMQ.Client;
global using RabbitMQ.Client.Events;
global using RabbitMQ.Client.Exceptions;
global using System;
global using System.IO;
global using System.Net.Sockets;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions;
global using System.Text;
global using System.Threading.Tasks;
global using System.Text.Json;

+ 1
- 0
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus</RootNamespace>
</PropertyGroup>


+ 5
- 7
src/BuildingBlocks/EventBus/EventBusServiceBus/GlobalUsings.cs View File

@ -1,13 +1,11 @@
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using System.Threading.Tasks;
global using System;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
global using Microsoft.Extensions.Logging;
global using System.Text;
global using System.Text;
global using System.Text.Json;
global using Azure.Messaging.ServiceBus;
global using Azure.Messaging.ServiceBus.Administration;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.Extensions.Logging;


+ 6
- 10
src/BuildingBlocks/EventBus/IntegrationEventLogEF/GlobalUsings.cs View File

@ -1,12 +1,8 @@
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Metadata.Builders;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using System;
global using System.Text.Json;
global using System.ComponentModel.DataAnnotations.Schema;
global using System.Linq;
global using System.Threading.Tasks;
global using Microsoft.EntityFrameworkCore.Storage;
global using System.Collections.Generic;
global using System.ComponentModel.DataAnnotations.Schema;
global using System.Data.Common;
global using System.Reflection;
global using System.Text.Json;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Metadata.Builders;
global using Microsoft.EntityFrameworkCore.Storage;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;

+ 1
- 0
src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF</RootNamespace>
</PropertyGroup>


+ 5
- 13
src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj View File

@ -2,23 +2,15 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
<PackageReference Include="Microsoft.NETCore.Platforms" />
<PackageReference Include="Polly" />
<PackageReference Include="System.Data.SqlClient" />
</ItemGroup>


+ 54
- 56
src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs View File

@ -1,77 +1,75 @@
using System;
using System.Data.SqlClient;
using System.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Polly;
namespace Microsoft.AspNetCore.Hosting
namespace Microsoft.AspNetCore.Hosting;
public static class IWebHostExtensions
{
public static class IWebHostExtensions
public static bool IsInKubernetes(this IServiceProvider services)
{
public static bool IsInKubernetes(this IServiceProvider services)
{
var cfg = services.GetService<IConfiguration>();
var orchestratorType = cfg.GetValue<string>("OrchestratorType");
return orchestratorType?.ToUpper() == "K8S";
}
public static IServiceProvider MigrateDbContext<TContext>(this IServiceProvider services, Action<TContext, IServiceProvider> seeder) where TContext : DbContext
{
var underK8s = services.IsInKubernetes();
using var scope = services.CreateScope();
var scopeServices = scope.ServiceProvider;
var logger = scopeServices.GetRequiredService<ILogger<TContext>>();
var context = scopeServices.GetService<TContext>();
var cfg = services.GetService<IConfiguration>();
var orchestratorType = cfg.GetValue<string>("OrchestratorType");
return orchestratorType?.ToUpper() == "K8S";
}
try
{
logger.LogInformation("Migrating database associated with context {DbContextName}", typeof(TContext).Name);
public static IServiceProvider MigrateDbContext<TContext>(this IServiceProvider services, Action<TContext, IServiceProvider> seeder) where TContext : DbContext
{
var underK8s = services.IsInKubernetes();
if (underK8s)
{
InvokeSeeder(seeder, context, scopeServices);
}
else
{
var retries = 10;
var retry = Policy.Handle<SqlException>()
.WaitAndRetry(
retryCount: retries,
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)),
onRetry: (exception, timeSpan, retry, ctx) =>
{
logger.LogWarning(exception, "[{prefix}] Error migrating database (attempt {retry} of {retries})", nameof(TContext), retry, retries);
});
using var scope = services.CreateScope();
var scopeServices = scope.ServiceProvider;
var logger = scopeServices.GetRequiredService<ILogger<TContext>>();
var context = scopeServices.GetService<TContext>();
//if the sql server container is not created on run docker compose this
//migration can't fail for network related exception. The retry options for DbContext only
//apply to transient exceptions
// Note that this is NOT applied when running some orchestrators (let the orchestrator to recreate the failing service)
retry.Execute(() => InvokeSeeder(seeder, context, scopeServices));
}
try
{
logger.LogInformation("Migrating database associated with context {DbContextName}", typeof(TContext).Name);
logger.LogInformation("Migrated database associated with context {DbContextName}", typeof(TContext).Name);
if (underK8s)
{
InvokeSeeder(seeder, context, scopeServices);
}
catch (Exception ex)
else
{
logger.LogError(ex, "An error occurred while migrating the database used on context {DbContextName}", typeof(TContext).Name);
if (underK8s)
{
throw; // Rethrow under k8s because we rely on k8s to re-run the pod
}
var retries = 10;
var retry = Policy.Handle<SqlException>()
.WaitAndRetry(
retryCount: retries,
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)),
onRetry: (exception, timeSpan, retry, ctx) =>
{
logger.LogWarning(exception, "[{prefix}] Error migrating database (attempt {retry} of {retries})", nameof(TContext), retry, retries);
});
//if the sql server container is not created on run docker compose this
//migration can't fail for network related exception. The retry options for DbContext only
//apply to transient exceptions
// Note that this is NOT applied when running some orchestrators (let the orchestrator to recreate the failing service)
retry.Execute(() => InvokeSeeder(seeder, context, scopeServices));
}
return services;
logger.LogInformation("Migrated database associated with context {DbContextName}", typeof(TContext).Name);
}
private static void InvokeSeeder<TContext>(Action<TContext, IServiceProvider> seeder, TContext context, IServiceProvider services)
where TContext : DbContext
catch (Exception ex)
{
context.Database.Migrate();
seeder(context, services);
logger.LogError(ex, "An error occurred while migrating the database used on context {DbContextName}", typeof(TContext).Name);
if (underK8s)
{
throw; // Rethrow under k8s because we rely on k8s to re-run the pod
}
}
return services;
}
private static void InvokeSeeder<TContext>(Action<TContext, IServiceProvider> seeder, TContext context, IServiceProvider services)
where TContext : DbContext
{
context.Database.Migrate();
seeder(context, services);
}
}

+ 1
- 0
src/Services/Basket/Basket.API/Basket.API.csproj View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<UserSecretsId>2964ec8e-0d48-4541-b305-94cab537f867</UserSecretsId>
</PropertyGroup>


+ 1
- 10
src/Services/Basket/Basket.API/GlobalUsings.cs View File

@ -1,10 +1,6 @@
global using System;
global using System.Collections.Generic;
global using System.ComponentModel.DataAnnotations;
global using System.Linq;
global using System.ComponentModel.DataAnnotations;
global using System.Security.Claims;
global using System.Text.Json;
global using System.Threading.Tasks;
global using Basket.API.IntegrationEvents.EventHandling;
global using Basket.API.IntegrationEvents.Events;
global using Basket.API.Model;
@ -12,8 +8,6 @@ global using Basket.API.Repositories;
global using Grpc.Core;
global using GrpcBasket;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
@ -21,8 +15,5 @@ global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.E
global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events;
global using Microsoft.eShopOnContainers.Services.Basket.API.Model;
global using Microsoft.eShopOnContainers.Services.Basket.API.Services;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Services.Common;
global using StackExchange.Redis;

+ 1
- 0
src/Services/Catalog/Catalog.API/Catalog.API.csproj View File

@ -5,6 +5,7 @@
<AssemblyName>Catalog.API</AssemblyName>
<PackageId>Catalog.API</PackageId>
<UserSecretsId>aspnet-Catalog.API-20161122013618</UserSecretsId>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>


+ 2
- 13
src/Services/Catalog/Catalog.API/GlobalUsings.cs View File

@ -1,17 +1,10 @@
global using System;
global using System.Collections.Generic;
global using System.Data.Common;
global using System.Data.Common;
global using System.Data.SqlClient;
global using System.Globalization;
global using System.IO;
global using System.IO.Compression;
global using System.Linq;
global using System.Text.RegularExpressions;
global using System.Threading.Tasks;
global using Catalog.API.Apis;
global using Grpc.Core;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Hosting;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Design;
@ -32,11 +25,7 @@ global using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.
global using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events;
global using Microsoft.eShopOnContainers.Services.Catalog.API.Model;
global using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Polly;
global using Polly.Retry;
global using Services.Common;
global using Catalog.API.Apis;

+ 1
- 0
src/Services/Identity/Identity.API/Identity.API.csproj View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>


+ 1
- 13
src/Services/Ordering/Ordering.API/GlobalUsings.cs View File

@ -1,12 +1,6 @@
global using System;
global using System.Collections.Generic;
global using System.Data.Common;
global using System.Data.Common;
global using System.Data.SqlClient;
global using System.IO;
global using System.Linq;
global using System.Runtime.Serialization;
global using System.Threading;
global using System.Threading.Tasks;
global using Azure.Identity;
global using Dapper;
global using FluentValidation;
@ -14,9 +8,6 @@ global using Google.Protobuf.Collections;
global using Grpc.Core;
global using MediatR;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Hosting;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Design;
@ -45,9 +36,6 @@ global using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Repositories;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Polly;
global using Polly.Retry;


+ 1
- 0
src/Services/Ordering/Ordering.API/Ordering.API.csproj View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UserSecretsId>aspnet-Ordering.API-20161122013547</UserSecretsId>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<RootNamespace>Microsoft.eShopOnContainers.Services.Ordering.API</RootNamespace>
</PropertyGroup>


+ 1
- 3
src/Services/Ordering/Ordering.BackgroundTasks/GlobalUsings.cs View File

@ -1,10 +1,8 @@
global using System;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
global using Microsoft.Extensions.Logging;
global using Ordering.BackgroundTasks;
global using Ordering.BackgroundTasks.Extensions;
global using Ordering.BackgroundTasks.Services;
global using Services.Common;

+ 1
- 0
src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-Ordering.BackgroundTasks-9D3E1DD6-405B-447F-8AAB-1708B36D260E</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>


+ 3
- 8
src/Services/Ordering/Ordering.Domain/GlobalUsings.cs View File

@ -1,12 +1,7 @@
global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions;
global using System.Reflection;
global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions;
global using MediatR;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Events;
global using System.Collections.Generic;
global using System.Linq;
global using System.Reflection;
global using System.Threading.Tasks;
global using System.Threading;
global using System;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;

+ 1
- 0
src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>


+ 5
- 10
src/Services/Ordering/Ordering.Infrastructure/GlobalUsings.cs View File

@ -1,17 +1,12 @@
global using MediatR;
global using System.Data;
global using MediatR;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Design;
global using Microsoft.EntityFrameworkCore.Metadata.Builders;
global using Microsoft.EntityFrameworkCore.Storage;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions;
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.EntityConfigurations;
global using System.Data;
global using System.Linq;
global using System.Threading.Tasks;
global using System.Threading;
global using System;
global using System.Collections.Generic;
global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;

+ 1
- 0
src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>


+ 1
- 8
src/Services/Ordering/Ordering.SignalrHub/GlobalUsings.cs View File

@ -1,9 +1,5 @@
global using System;
global using System.Collections.Generic;
global using System.Threading.Tasks;
global using Microsoft.AspNetCore.Authentication.JwtBearer;
global using Microsoft.AspNetCore.Authentication.JwtBearer;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.SignalR;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
@ -11,7 +7,4 @@ global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub;
global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents;
global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.EventHandling;
global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.Events;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Services.Common;

+ 1
- 0
src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>


+ 1
- 5
src/Services/Payment/Payment.API/GlobalUsings.cs View File

@ -1,11 +1,7 @@
global using System.Threading.Tasks;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.eShopOnContainers.Payment.API;
global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.EventHandling;
global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.Events;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Services.Common;

+ 1
- 0
src/Services/Payment/Payment.API/Payment.API.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>


+ 1
- 11
src/Services/Webhooks/Webhooks.API/GlobalUsings.cs View File

@ -1,26 +1,16 @@
global using System;
global using System.Collections.Generic;
global using System.ComponentModel.DataAnnotations;
global using System.ComponentModel.DataAnnotations;
global using System.Data.Common;
global using System.Linq;
global using System.Net;
global using System.Net.Http;
global using System.Text;
global using System.Text.Json;
global using System.Threading.Tasks;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Hosting;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Design;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using Services.Common;
global using Webhooks.API.Infrastructure;
global using Webhooks.API.IntegrationEvents;


+ 1
- 0
src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>


+ 5
- 5
src/Tests/Services/Application.FunctionalTests/GlobalUsings.cs View File

@ -1,14 +1,14 @@
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Net.Http;
global using Microsoft.AspNetCore.Http;
global using System.Security.Claims;
global using System.Text;
global using System.Text.Json;
global using System.Threading.Tasks;
global using Microsoft.AspNetCore.Http;
global using Microsoft.eShopOnContainers.Services.Basket.API.Model;
global using Microsoft.eShopOnContainers.WebMVC.ViewModels;
global using System.Text.Json;
global using System.Collections.Generic;
global using System.Linq;
global using System.Text;
global using WebMVC.Services.ModelDTOs;
global using Xunit;

+ 1
- 0
src/Web/WebMVC/WebMVC.csproj View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId>
<ImplicitUsings>enable</ImplicitUsings>
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
</PropertyGroup>


+ 2
- 10
src/Web/WebStatus/GlobalUsings.cs View File

@ -1,13 +1,5 @@
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.Extensions.Configuration;
global using System.Linq;
global using Microsoft.AspNetCore.Hosting;
global using System;
global using System.Collections.Generic;
global using Azure.Core;
global using Azure.Identity;
global using Azure.Core;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Diagnostics.HealthChecks;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.Extensions.Diagnostics.HealthChecks;
global using Microsoft.Extensions.Hosting;

+ 1
- 1
src/Web/WebStatus/WebStatus.csproj View File

@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<ItemGroup>


+ 1
- 4
src/Web/WebhookClient/WebhookClient.csproj View File

@ -2,12 +2,9 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<UserSecretsId>36215d41-f31a-4aa6-9929-bd67d650e7b5</UserSecretsId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<ItemGroup>


Loading…
Cancel
Save