Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 508fa59

Browse files
authored
Added implict usings (#2125)
1 parent 3b9560c commit 508fa59

File tree

38 files changed

+126
-250
lines changed

38 files changed

+126
-250
lines changed
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
global using CatalogApi;
2-
global using Grpc.Core.Interceptors;
1+
global using System.Text.Json;
2+
global using CatalogApi;
33
global using Grpc.Core;
4+
global using Grpc.Core.Interceptors;
45
global using GrpcBasket;
56
global using Microsoft.AspNetCore.Authorization;
6-
global using Microsoft.AspNetCore.Builder;
7-
global using Microsoft.AspNetCore.Http;
87
global using Microsoft.AspNetCore.Mvc;
98
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;
109
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Infrastructure;
1110
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models;
1211
global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
13-
global using Microsoft.Extensions.Configuration;
14-
global using Microsoft.Extensions.DependencyInjection;
15-
global using Microsoft.Extensions.Logging;
1612
global using Microsoft.Extensions.Options;
17-
global using System.Collections.Generic;
18-
global using System.Linq;
19-
global using System.Net.Http;
20-
global using System.Net;
21-
global using System.Text.Json;
22-
global using System.Threading.Tasks;
23-
global using System;
2413
global using Services.Common;

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,15 @@
55
<AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName>
66
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
77
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
8-
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
9-
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
8+
<ImplicitUsings>enable</ImplicitUsings>
109
</PropertyGroup>
1110

12-
<ItemGroup>
13-
<Compile Remove="wwwroot\**" />
14-
<Content Remove="wwwroot\**" />
15-
<EmbeddedResource Remove="wwwroot\**" />
16-
<None Remove="wwwroot\**" />
17-
</ItemGroup>
18-
1911
<ItemGroup>
2012
<PackageReference Include="Yarp.ReverseProxy" />
21-
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" />
2213
<PackageReference Include="AspNetCore.HealthChecks.Uris" />
2314
<PackageReference Include="Google.Protobuf" />
2415
<PackageReference Include="Grpc.AspNetCore.Server.ClientFactory" />
25-
<PackageReference Include="Grpc.Core" />
26-
<PackageReference Include="Grpc.Net.ClientFactory" />
2716
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
28-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
29-
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
30-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
31-
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
32-
<PackageReference Include="Swashbuckle.AspNetCore" />
3317
</ItemGroup>
3418

3519
<ItemGroup>
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1-
global using System;
2-
global using System.Collections.Generic;
3-
global using System.Linq;
4-
global using System.Net;
5-
global using System.Net.Http;
6-
global using System.Net.Http.Headers;
7-
global using System.Text.Json;
8-
global using System.Threading;
9-
global using System.Threading.Tasks;
1+
global using System.Text.Json;
102
global using CatalogApi;
113
global using Grpc.Core;
124
global using Grpc.Core.Interceptors;
135
global using GrpcBasket;
14-
global using Microsoft.AspNetCore.Authentication;
156
global using Microsoft.AspNetCore.Authorization;
16-
global using Microsoft.AspNetCore.Builder;
17-
global using Microsoft.AspNetCore.Http;
187
global using Microsoft.AspNetCore.Mvc;
198
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config;
209
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure;
2110
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
2211
global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
23-
global using Microsoft.Extensions.Configuration;
24-
global using Microsoft.Extensions.DependencyInjection;
25-
global using Microsoft.Extensions.Logging;
2612
global using Microsoft.Extensions.Options;
2713
global using Services.Common;

src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>net7.0</TargetFramework>
55
<AssemblyName>Web.Shopping.HttpAggregator</AssemblyName>
66
<RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
78
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
89
</PropertyGroup>
910

src/BuildingBlocks/EventBus/EventBus/EventBus.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
56
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBus</RootNamespace>
67
</PropertyGroup>
78

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
1+
global using System.Text.Json.Serialization;
2+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
23
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
34
global using static Microsoft.eShopOnContainers.BuildingBlocks.EventBus.InMemoryEventBusSubscriptionsManager;
4-
global using System.Collections.Generic;
5-
global using System.Linq;
6-
global using System.Text.Json.Serialization;
7-
global using System.Threading.Tasks;
8-
global using System;

src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
56
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ</RootNamespace>
67
</PropertyGroup>
78

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
global using Microsoft.Extensions.Logging;
1+
global using System.Net.Sockets;
2+
global using System.Text;
3+
global using System.Text.Json;
4+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
5+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
6+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
7+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions;
8+
global using Microsoft.Extensions.Logging;
29
global using Polly;
310
global using Polly.Retry;
411
global using RabbitMQ.Client;
512
global using RabbitMQ.Client.Events;
613
global using RabbitMQ.Client.Exceptions;
7-
global using System;
8-
global using System.IO;
9-
global using System.Net.Sockets;
10-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
11-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
12-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
13-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions;
14-
global using System.Text;
15-
global using System.Threading.Tasks;
16-
global using System.Text.Json;

src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
56
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus</RootNamespace>
67
</PropertyGroup>
78

src/BuildingBlocks/EventBus/EventBusServiceBus/GlobalUsings.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
2-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
3-
global using System.Threading.Tasks;
4-
global using System;
5-
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
6-
global using Microsoft.Extensions.Logging;
7-
global using System.Text;
1+
global using System.Text;
82
global using System.Text.Json;
93
global using Azure.Messaging.ServiceBus;
104
global using Azure.Messaging.ServiceBus.Administration;
5+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
6+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
7+
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
8+
global using Microsoft.Extensions.Logging;
119

1210

1311

0 commit comments

Comments
 (0)