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

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));
}
}
}