Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9ac3809

Browse files
committedApr 5, 2025
chore: remove unnecessary namespace imports
- Removed global `using` directives for `System.Text` and `System.Text.Json` from `GlobalUsings.cs`. - Added required namespace references in `Directory.Build.props` to ensure compatibility during build. - Improves code maintainability and clarity by reducing redundant global imports.
1 parent 71007d7 commit 9ac3809

File tree

10 files changed

+5
-14
lines changed

10 files changed

+5
-14
lines changed
 

‎src/Demo/Maint/Maint.Application/GlobalUsings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
global using System.Reflection;
2-
global using System.Text;
32
global using Adnc.Demo.Maint.Application.Dtos;
43
global using Adnc.Demo.Maint.Repository;
54
global using Adnc.Infra.Repository;

‎src/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
1818
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1919
</PropertyGroup>
20+
<ItemGroup>
21+
<Using Include="System.Text" />
22+
<Using Include="System.Text.Json"/>
23+
<Using Include="System.Collections" />
24+
</ItemGroup>
2025
<PropertyGroup>
2126
<Infra_Version>1.0.0-preview-250339</Infra_Version>
2227
<Shared_Version>1.0.0-preview-250339</Shared_Version>

‎src/Gateways/Ocelot/ApplicationBuilderExtension.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Text;
2-
31
namespace Adnc.Gateway.Ocelot;
42

53
public static class ApplicationBuilderExtension

‎src/Gateways/Ocelot/JWTOptions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Text;
2-
31
namespace Adnc.Gateway.Ocelot;
42

53
/// <summary>

‎src/Infrastructures/Consul/GlobalUsings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
global using System.Net;
2-
global using System.Text.Json;
32
global using Consul;
43
global using Microsoft.Extensions.Configuration;
54
global using Microsoft.Extensions.DependencyInjection;

‎src/Infrastructures/Core/GlobalUsings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
global using System.Diagnostics.CodeAnalysis;
44
global using System.Net;
55
global using System.Reflection;
6-
global using System.Text;
7-
global using System.Text.Json;
86
global using Microsoft.Extensions.Configuration;
97
global using Microsoft.Extensions.Hosting;

‎src/Infrastructures/EventBus/GlobalUsings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
global using System.Text;
2-
global using System.Text.Json;
31
global using Microsoft.Extensions.Configuration;
42
global using Microsoft.Extensions.Hosting;
53
global using Microsoft.Extensions.Logging;

‎src/ServiceShared/Application/GlobalUsings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
global using System.Linq.Expressions;
22
global using System.Net;
33
global using System.Reflection;
4-
global using System.Text.Json;
54
global using Adnc.Infra.Core.DependencyInjection;
65
global using Adnc.Infra.Core.Json;
76
global using Adnc.Infra.IdGenerater.Yitter;

‎src/ServiceShared/Remote/GlobalUsings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
global using System.Net.Http.Headers;
2-
global using System.Text;
32
global using Adnc.Infra.Helper;
43
global using Microsoft.AspNetCore.Http;
54
global using Microsoft.Extensions.DependencyInjection;

‎src/ServiceShared/WebApi/GlobalUsings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
global using System.IdentityModel.Tokens.Jwt;
22
global using System.Net;
33
global using System.Security.Claims;
4-
global using System.Text;
54
global using System.Text.Encodings.Web;
6-
global using System.Text.Json;
75
global using Adnc.Infra.Core.DependencyInjection;
86
global using Adnc.Infra.Core.Json;
97
global using Adnc.Infra.EventBus.RabbitMq;

0 commit comments

Comments
 (0)
Please sign in to comment.