Build daemon commands through typed operations
This commit is contained in:
parent
93ece6b305
commit
b8179c6093
2 changed files with 228 additions and 242 deletions
|
|
@ -6017,6 +6017,22 @@ static void RequireTypedDaemonCommandPayloads(string root)
|
|||
string.Join(", ", publicDocumentSubmitHits));
|
||||
}
|
||||
|
||||
var forbiddenClientDocumentBuilderSymbols = new[]
|
||||
{
|
||||
"Action<AetheriaRuntimeDaemonCommandDocument>",
|
||||
"configure?.Invoke(command)",
|
||||
"Send(AetheriaRuntimeDaemonCommandKinds"
|
||||
};
|
||||
var clientDocumentBuilderHits = forbiddenClientDocumentBuilderSymbols
|
||||
.Where(symbol => daemonClient.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (clientDocumentBuilderHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Daemon operation client still routes typed operations through mutable document builder callbacks: " +
|
||||
string.Join(", ", clientDocumentBuilderHits));
|
||||
}
|
||||
|
||||
if (tests.Contains("AetheriaRuntimeDaemonCommandLog.", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
|
|
|
|||
Loading…
Reference in a new issue