using System; #nullable enable namespace GameCult.Aetheria.State.Unity { public sealed class AetheriaRuntimeObservedDaemonState { public AetheriaRuntimeObservedDaemonState( AetheriaRuntimeDaemonFrameDocument frame, AetheriaRuntimeDaemonSoaViewDocument? soaView, string framePath, string soaViewPath) { Frame = frame ?? throw new ArgumentNullException(nameof(frame)); SoaView = soaView; SoaIndex = AetheriaRuntimeDaemonSoaViewIndex.Build(soaView); FramePath = framePath ?? ""; SoaViewPath = soaViewPath ?? ""; } public AetheriaRuntimeDaemonFrameDocument Frame { get; } public AetheriaRuntimeDaemonSoaViewDocument? SoaView { get; } public AetheriaRuntimeDaemonSoaViewIndex SoaIndex { get; } public string FramePath { get; } public string SoaViewPath { get; } public bool HasSoaView => SoaView != null && SoaIndex.IsValid; public bool IsAuthoritative => Frame.IsAuthoritative; public AetheriaRuntimeRunCheckpointCommit Run => Frame.Run; } }