Skip to content

Commit df47208

Browse files
committed
Fix generated code namespace confliction
1 parent eb0ee98 commit df47208

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/en/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Corresponding generated source (interceptor):
514514
```csharp
515515
#nullable enable
516516

517-
namespace DotNetCampus.CommandLine.Compiler
517+
namespace DotNetCampus.Cli.Compiler
518518
{
519519
file static class Interceptors
520520
{

docs/zh-hans/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ _ = CommandLine.Parse(args, CommandLineParsingOptions.DotNet).As<Options>();
514514
```csharp
515515
#nullable enable
516516

517-
namespace DotNetCampus.CommandLine.Compiler
517+
namespace DotNetCampus.Cli.Compiler
518518
{
519519
file static class Interceptors
520520
{

src/DotNetCampus.CommandLine.Analyzer/Generators/InterceptorGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private string GenerateCode(Dictionary<ISymbol, ImmutableArray<InterceptorGenera
103103
return $$"""
104104
#nullable enable
105105
106-
namespace {{GeneratorInfo.RootNamespace}}.Compiler
106+
namespace DotNetCampus.Cli.Compiler
107107
{
108108
file static class Interceptors
109109
{

src/DotNetCampus.CommandLine/Package/build/Package.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<DotNetCampusCommandLineUseInterceptor Condition="'$(DotNetCampusCommandLineUseInterceptor)' == ''">true</DotNetCampusCommandLineUseInterceptor>
5-
<InterceptorsNamespaces>$(InterceptorsNamespaces);DotNetCampus.CommandLine.Compiler</InterceptorsNamespaces>
5+
<InterceptorsNamespaces>$(InterceptorsNamespaces);DotNetCampus.Cli.Compiler</InterceptorsNamespaces>
66

77
<!--
88
https://github.com/dotnet/roslyn/blob/main/docs/features/interceptors.md
@@ -12,7 +12,7 @@
1212
为了兼容性,属性 <InterceptorsPreviewNamespaces> 可用作 <InterceptorsNamespaces> 的别名。
1313
如果两个属性都具有非空值,则它们在传递给编译器时将按 $(InterceptorsNamespaces);$(InterceptorsPreviewNamespaces) 的顺序连接在一起。
1414
-->
15-
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);DotNetCampus.CommandLine.Compiler</InterceptorsPreviewNamespaces>
15+
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);DotNetCampus.Cli.Compiler</InterceptorsPreviewNamespaces>
1616
</PropertyGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)