diff --git a/ConstructorGenerator.Attributes/ConstructorGenerator.Attributes.csproj b/ConstructorGenerator.Attributes/ConstructorGenerator.Attributes.csproj index 75bc723..4fd1650 100644 --- a/ConstructorGenerator.Attributes/ConstructorGenerator.Attributes.csproj +++ b/ConstructorGenerator.Attributes/ConstructorGenerator.Attributes.csproj @@ -5,7 +5,7 @@ enable enable 10 - 1.0.0 + 1.0.2 diff --git a/ConstructorGenerator/ConstructorGenerator.cs b/ConstructorGenerator/ConstructorGenerator.cs index 40e1615..96f7544 100644 --- a/ConstructorGenerator/ConstructorGenerator.cs +++ b/ConstructorGenerator/ConstructorGenerator.cs @@ -30,7 +30,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterSourceOutput(generationResult, (sourceProductionContext, source) => { - sourceProductionContext.AddSource($"{source.Item1.Type.Name}_ConstructorGenerator.g.cs", source.Item2.Code); + sourceProductionContext.AddSource($"{source.Item1.Type.ContainingNamespace}.{source.Item1.Type.Name}_ConstructorGenerator.g.cs", source.Item2.Code); }); } diff --git a/ConstructorGenerator/ConstructorGenerator.csproj b/ConstructorGenerator/ConstructorGenerator.csproj index 24b16af..c0eef04 100644 --- a/ConstructorGenerator/ConstructorGenerator.csproj +++ b/ConstructorGenerator/ConstructorGenerator.csproj @@ -10,7 +10,7 @@ generator; c#; constructor https://github.com/Swarley97/ConstructorGenerator true - 1.0.1 + 1.0.2 README.md MIT false diff --git a/Sandbox/Sandbox.csproj b/Sandbox/Sandbox.csproj index 948009a..fc83b5a 100644 --- a/Sandbox/Sandbox.csproj +++ b/Sandbox/Sandbox.csproj @@ -15,4 +15,5 @@ + diff --git a/Sandbox/Sub/OtherClass.cs b/Sandbox/Sub/OtherClass.cs new file mode 100644 index 0000000..fe84144 --- /dev/null +++ b/Sandbox/Sub/OtherClass.cs @@ -0,0 +1,9 @@ +using ConstructorGenerator.Attributes; + +namespace Sandbox.Sub; + +internal partial struct Triangle +{ + [ConstructorDependency(IsOptional = true)] + private double A; +} \ No newline at end of file