изменение названия атрибута

This commit is contained in:
2025-02-04 20:57:04 +03:00
parent d732510a9f
commit f0f8460632
11 changed files with 15 additions and 13 deletions
@@ -102,23 +102,25 @@ namespace {Namespace}
.OfType<IMethodSymbol>();
Console.WriteLine(methodBody.Select(i => i.ToDisplayString()));
var originalName = className;
// Build up the source code
className = className.TrimStart('I') + "RemoteEndpoint";
var code = $@"// <auto-generated/>
using System;
using mROA.Implementation;
using System.Collections.Generic;
namespace {namespaceName};
partial class {className} (int id, ISerialisationModule.IFrontendSerialisationModule serialisationModule) : ITestParameter, IRemoteObject
partial class {className} (int id, ISerialisationModule.IFrontendSerialisationModule serialisationModule) : {originalName}, IRemoteObject
{{
public int Id => id;
}}
";
// Add the source code to the compilation.
context.AddSource($"{className}.g.cs", SourceText.From(code, Encoding.UTF8));
// context.AddSource($"{className}.g.cs", SourceText.From(code, Encoding.UTF8));
}
}
}
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Codegen")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1888db3522e2880c8ef7146ee78cc413905212c4")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d732510a9fde122ff874ca08ed8c0f85b5fe6c02")]
[assembly: System.Reflection.AssemblyProductAttribute("mROA.Codegen")]
[assembly: System.Reflection.AssemblyTitleAttribute("mROA.Codegen")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]