Add <auto-generated> (#24)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
|
||||
var interfaceName = targetClassSymbol.ResolveInterfaceNameWithOptionalTypeConstraints(pd.InterfaceName);
|
||||
|
||||
var file = new FileData(
|
||||
$"{pd.FileName}.cs",
|
||||
$"{pd.FileName}.g.cs",
|
||||
CreatePartialInterfaceCode(pd.Namespace, targetClassSymbol, interfaceName, pd.ProxyAll)
|
||||
);
|
||||
|
||||
@@ -39,7 +39,17 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
|
||||
return file;
|
||||
}
|
||||
|
||||
private string CreatePartialInterfaceCode(string ns, INamedTypeSymbol targetClassSymbol, string interfaceName, bool proxyAll) => $@"using System;
|
||||
private string CreatePartialInterfaceCode(string ns, INamedTypeSymbol targetClassSymbol, string interfaceName, bool proxyAll) => $@"//----------------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
#nullable enable
|
||||
using System;
|
||||
|
||||
namespace {ns}
|
||||
{{
|
||||
@@ -51,7 +61,8 @@ namespace {ns}
|
||||
|
||||
{GenerateEvents(targetClassSymbol)}
|
||||
}}
|
||||
}}";
|
||||
}}
|
||||
#nullable disable";
|
||||
|
||||
private string GenerateProperties(INamedTypeSymbol targetClassSymbol, bool proxyAll)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user