Skip to content

Commit

Permalink
Include namespace in generator
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderssonPeter committed Dec 5, 2024
1 parent e290960 commit b02fee8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dolly/DollyGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace Dolly;
* X Structs
* CloneConstructorAttribute
* IClone
* Move interfaces and attributes to dependency to simplify cross assemlby usage
*/

[Generator]
Expand Down Expand Up @@ -96,6 +97,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
result.Handle(model =>
{
var sourceText = SourceText.From($$"""
using Dolly;
using System.Linq;
namespace {{model.Namespace}};
{{model.GetModifiers()}} {{model.Name}} : IClonable<{{model.Name}}>
Expand Down

0 comments on commit b02fee8

Please sign in to comment.