Remove ambient runtime client lookup
This commit is contained in:
parent
4d83407665
commit
8d0b9a7785
2 changed files with 4 additions and 19 deletions
|
|
@ -16337,7 +16337,6 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
|
|||
"public static AetheriaUi Ui(",
|
||||
"public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(string runtimeId = \"\")",
|
||||
"public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public static AetheriaClient CurrentClientForStateFile(string stateFilePath)",
|
||||
"private static readonly Dictionary<string, AetheriaClient> RuntimeClients",
|
||||
"RuntimeClients.TryGetValue(cacheKey, out var runtimeClient)",
|
||||
"RuntimeClients[cacheKey] = runtimeClient",
|
||||
|
|
@ -16361,10 +16360,12 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
|
|||
}
|
||||
|
||||
if (runtimeClientProvider.Contains("AetheriaRuntimePlayerSettingsSession _playerSettingsDocument", StringComparison.Ordinal) ||
|
||||
runtimeClientProvider.Contains("CurrentClientForStateFile", StringComparison.Ordinal) ||
|
||||
runtimeClientProvider.Contains("StatePathCachePrefix", StringComparison.Ordinal) ||
|
||||
runtimeClientProvider.Contains(".ObservePlayer()", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaUnityRuntimeClientProvider still routes player settings through a legacy session wrapper instead of the reactive typed document.");
|
||||
"AetheriaUnityRuntimeClientProvider must expose narrow state/control/UI handles, not legacy sessions or ambient current-client lookups.");
|
||||
}
|
||||
|
||||
var providerOwnedClientAccessSources = new Dictionary<string, string>
|
||||
|
|
|
|||
|
|
@ -153,17 +153,6 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeState(stateBoot, runtimeId).Reactive<TDocument>(index);
|
||||
}
|
||||
|
||||
public static AetheriaClient CurrentClientForStateFile(string stateFilePath)
|
||||
{
|
||||
foreach (var pair in RuntimeClients)
|
||||
{
|
||||
if (pair.Key.StartsWith(StatePathCachePrefix(stateFilePath), StringComparison.Ordinal))
|
||||
return pair.Value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Dispose()
|
||||
{
|
||||
_playerSettingsDocument?.Dispose();
|
||||
|
|
@ -178,12 +167,7 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
|
||||
private static string CacheKey(string stateFilePath, string runtimeId)
|
||||
{
|
||||
return StatePathCachePrefix(stateFilePath) + runtimeId;
|
||||
}
|
||||
|
||||
private static string StatePathCachePrefix(string stateFilePath)
|
||||
{
|
||||
return (stateFilePath ?? "") + "\n";
|
||||
return (stateFilePath ?? "") + "\n" + runtimeId;
|
||||
}
|
||||
|
||||
private static void RefreshPlayerSettings(RuntimePlayerSettings settings)
|
||||
|
|
|
|||
Loading…
Reference in a new issue