изменение названия атрибута
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user