ProxyBaseClasses (#27)

This commit is contained in:
Stef Heyenrath
2022-02-01 18:49:01 +01:00
committed by GitHub
parent 649ed89bb6
commit f9664e0564
45 changed files with 1305 additions and 836 deletions
@@ -1,12 +1,12 @@
namespace ProxyInterfaceSourceGenerator.FileGenerators
{
internal class ProxyAttributeGenerator : IFileGenerator
{
private const string ClassName = "ProxyAttribute";
namespace ProxyInterfaceSourceGenerator.FileGenerators;
public FileData GenerateFile()
{
return new FileData($"ProxyInterfaceGenerator.{ClassName}.g.cs", $@"//----------------------------------------------------------------------------------------
internal class ProxyAttributeGenerator : IFileGenerator
{
private const string ClassName = "ProxyAttribute";
public FileData GenerateFile()
{
return new FileData($"ProxyInterfaceGenerator.{ClassName}.g.cs", $@"//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator.
//
@@ -23,15 +23,14 @@ namespace ProxyInterfaceGenerator
public class {ClassName} : Attribute
{{
public Type Type {{ get; }}
public bool ProxyAll {{ get; }}
public bool ProxyBaseClasses {{ get; }}
public {ClassName}(Type type, bool proxyAll = false)
public {ClassName}(Type type, bool proxyBaseClasses = false)
{{
Type = type;
ProxyAll = proxyAll;
ProxyBaseClasses = proxyBaseClasses;
}}
}}
}}");
}
}
}