initial code

This commit is contained in:
Stef Heyenrath
2021-07-23 16:28:11 +02:00
parent af0a3e0a5d
commit 7c68455a8e
15 changed files with 527 additions and 0 deletions
@@ -0,0 +1,30 @@
namespace ProxyInterfaceSourceGenerator.FileGenerators
{
internal class ProxyAttributeGenerator : IFileGenerator
{
private const string ClassName = "ProxyAttribute";
public Data GenerateFile()
{
return new Data
{
FileName = $"{ClassName}.cs",
Text = $@"using System;
namespace ProxyInterfaceGenerator
{{
[AttributeUsage(AttributeTargets.Interface)]
public class {ClassName} : Attribute
{{
public Type Type {{ get; }}
public {ClassName}(Type type)
{{
Type = type;
}}
}}
}}"
};
}
}
}