Keep generic submit helpers internal
This commit is contained in:
parent
266c33324e
commit
ae7eee7e06
2 changed files with 19 additions and 2 deletions
|
|
@ -6875,6 +6875,8 @@ static void RequireTypedEveCommandBodies(string root)
|
|||
"internal Task<AetheriaRuntimeDaemonCommandEnvelope> SubmitDaemonCommandAsync(",
|
||||
"internal Task<AetheriaRuntimeEveCommandEnvelope> SubmitEveCommandAsync(",
|
||||
"internal static class AetheriaRuntimeCommandSubmitter",
|
||||
"internal static bool TrySubmitEveCommand(",
|
||||
"internal static bool TrySubmitDaemonCommand(",
|
||||
"TrySubmitEveCommand(",
|
||||
"TrySubmitDaemonCommand(",
|
||||
"CreatePlayerSettingsCommand(",
|
||||
|
|
@ -6999,6 +7001,21 @@ static void RequireTypedEveCommandBodies(string root)
|
|||
string.Join(", ", publicRuntimePortSubmitHits));
|
||||
}
|
||||
|
||||
var forbiddenPublicSubmitterMethods = new[]
|
||||
{
|
||||
"public static bool TrySubmitDaemonCommand(",
|
||||
"public static bool TrySubmitEveCommand("
|
||||
};
|
||||
var publicSubmitterMethodHits = forbiddenPublicSubmitterMethods
|
||||
.Where(symbol => runtimeCommandPort.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (publicSubmitterMethodHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Runtime command submitter still marks generic submit helpers public instead of keeping them internal: " +
|
||||
string.Join(", ", publicSubmitterMethodHits));
|
||||
}
|
||||
|
||||
var forbiddenUnitySubmitterSymbols = new[]
|
||||
{
|
||||
"AetheriaRuntimeCommandSubmitter.TrySubmitEveCommand(",
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
private static readonly Dictionary<string, AetheriaRuntimeCommandPort> Ports =
|
||||
new Dictionary<string, AetheriaRuntimeCommandPort>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static bool TrySubmitDaemonCommand(
|
||||
internal static bool TrySubmitDaemonCommand(
|
||||
string stateFilePath,
|
||||
AetheriaRuntimeDaemonCommandDocument command,
|
||||
string runtimeId,
|
||||
|
|
@ -216,7 +216,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
}
|
||||
}
|
||||
|
||||
public static bool TrySubmitEveCommand(
|
||||
internal static bool TrySubmitEveCommand(
|
||||
string stateFilePath,
|
||||
AetheriaRuntimeEveCommandDocument command,
|
||||
string runtimeId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue