Restore CultCache.TryGet<T>: the audit missed AquaSynth's call

The Cut 2 subtraction audit listed TryGet<T> as unused, but
AquaSynth\src\AquaSynth.Core\CultCachePatchDocument.cs:104 calls
cache.TryGet(key, out CultCachePatchDocument? document). The map's grep
matched only TryGetByName/TryGetByIndex, so the call was missed and AquaSynth.Core,
AquaSynth.Faust, AquaSynth.Dsl.Tests and AquaSynthDaemon stopped compiling
against 85f2089. The method returns with the signature it had at e9b91c1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-13 17:00:36 +02:00
commit 946e8fcc2d

View file

@ -1322,6 +1322,12 @@ namespace GameCult.Caching
return Get(key) as T;
}
public bool TryGet<T>(CultRecordKey key, out T? document) where T : class
{
document = Get<T>(key);
return document != null;
}
public IEnumerable<T> GetAll<T>() where T : class
{
lock (_stateGate)