using ProxyInterfaceSourceGenerator.Models; namespace ProxyInterfaceSourceGenerator.FileGenerators; internal class ProxyAttributeGenerator : IFileGenerator { private const string ClassName = "ProxyAttribute"; public FileData GenerateFile() { return new FileData($"ProxyInterfaceGenerator.{ClassName}.g.cs", $@"//---------------------------------------------------------------------------------------- // // This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //---------------------------------------------------------------------------------------- using System; namespace ProxyInterfaceGenerator {{ [AttributeUsage(AttributeTargets.Interface)] public class {ClassName} : Attribute {{ public Type Type {{ get; }} public bool ProxyBaseClasses {{ get; }} public {ClassName}(Type type, bool proxyBaseClasses = false) {{ Type = type; ProxyBaseClasses = proxyBaseClasses; }} }} }}"); } }