Route daemon surface reads through client state
This commit is contained in:
parent
e78ef8ccb3
commit
81eb52f8a7
4 changed files with 190 additions and 45 deletions
|
|
@ -169,16 +169,16 @@ namespace GameCult.Aetheria.EveRuntime
|
|||
AetheriaClient client)
|
||||
{
|
||||
if (string.Equals(surfaceId, AetheriaRuntimeDaemonGameSurfaceBuilder.SurfaceId, StringComparison.Ordinal))
|
||||
return client.State.Daemon.ReactiveGameSurface();
|
||||
return client.State.ReactiveGameSurface();
|
||||
|
||||
if (string.Equals(surfaceId, AetheriaRuntimeDaemonGameSurfaceBuilder.TuiSurfaceId, StringComparison.Ordinal))
|
||||
return client.State.Daemon.ReactiveGameTuiSurface();
|
||||
return client.State.ReactiveGameTuiSurface();
|
||||
|
||||
if (string.Equals(surfaceId, AetheriaRuntimeDaemonEditorSurfaceBuilder.SurfaceId, StringComparison.Ordinal))
|
||||
return client.State.Daemon.ReactiveEditorSurface();
|
||||
return client.State.ReactiveEditorSurface();
|
||||
|
||||
if (string.Equals(surfaceId, AetheriaRuntimeDaemonEditorSurfaceBuilder.TuiSurfaceId, StringComparison.Ordinal))
|
||||
return client.State.Daemon.ReactiveEditorTuiSurface();
|
||||
return client.State.ReactiveEditorTuiSurface();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,6 +302,134 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return LatestObservedDaemonAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonProviderAdvertisementDocument> LatestProviderAdvertisementAsync()
|
||||
{
|
||||
return Daemon.LatestProviderAdvertisementAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonProviderAdvertisementDocument LatestProviderAdvertisement()
|
||||
{
|
||||
return LatestProviderAdvertisementAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonHealthDocument> LatestHealthAsync()
|
||||
{
|
||||
return Daemon.LatestHealthAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonHealthDocument LatestHealth()
|
||||
{
|
||||
return LatestHealthAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonCommandBoundaryDocument> LatestCommandBoundaryAsync()
|
||||
{
|
||||
return Daemon.LatestCommandBoundaryAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonCommandBoundaryDocument LatestCommandBoundary()
|
||||
{
|
||||
return LatestCommandBoundaryAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeVerseAuthorityPolicyDocument> LatestAuthorityPolicyAsync()
|
||||
{
|
||||
return Daemon.LatestAuthorityPolicyAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeVerseAuthorityPolicyDocument LatestAuthorityPolicy()
|
||||
{
|
||||
return LatestAuthorityPolicyAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestGameSurfaceAsync()
|
||||
{
|
||||
return Daemon.LatestGameSurfaceAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestGameSurface()
|
||||
{
|
||||
return LatestGameSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState>> ReactiveGameSurfaceAsync(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveGameSurfaceAsync(options);
|
||||
}
|
||||
|
||||
public CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState> ReactiveGameSurface(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveGameSurface(options);
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestGameTuiSurfaceAsync()
|
||||
{
|
||||
return Daemon.LatestGameTuiSurfaceAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestGameTuiSurface()
|
||||
{
|
||||
return LatestGameTuiSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState>> ReactiveGameTuiSurfaceAsync(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveGameTuiSurfaceAsync(options);
|
||||
}
|
||||
|
||||
public CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState> ReactiveGameTuiSurface(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveGameTuiSurface(options);
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestEditorSurfaceAsync()
|
||||
{
|
||||
return Daemon.LatestEditorSurfaceAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestEditorSurface()
|
||||
{
|
||||
return LatestEditorSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState>> ReactiveEditorSurfaceAsync(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveEditorSurfaceAsync(options);
|
||||
}
|
||||
|
||||
public CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState> ReactiveEditorSurface(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveEditorSurface(options);
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestEditorTuiSurfaceAsync()
|
||||
{
|
||||
return Daemon.LatestEditorTuiSurfaceAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestEditorTuiSurface()
|
||||
{
|
||||
return LatestEditorTuiSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState>> ReactiveEditorTuiSurfaceAsync(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveEditorTuiSurfaceAsync(options);
|
||||
}
|
||||
|
||||
public CultMeshReactiveDocument<global::Aetheria.State.Documents.EveSurfaceState> ReactiveEditorTuiSurface(
|
||||
CultMeshReactiveDocumentOptions? options = null)
|
||||
{
|
||||
return Daemon.ReactiveEditorTuiSurface(options);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeLoadoutTemplatesDocument> LatestLoadoutTemplatesAsync()
|
||||
{
|
||||
return LoadoutTemplates.LatestAsync();
|
||||
|
|
@ -451,9 +579,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
public async Task<CultMeshStateRefResolver> CreateEveSurfaceCultMeshStateRefResolverAsync()
|
||||
{
|
||||
var frameTask = Daemon.LatestFrameDocumentAsync();
|
||||
var healthTask = Daemon.LatestHealthAsync();
|
||||
var commandBoundaryTask = Daemon.LatestCommandBoundaryAsync();
|
||||
var frameTask = LatestDaemonFrameAsync();
|
||||
var healthTask = LatestHealthAsync();
|
||||
var commandBoundaryTask = LatestCommandBoundaryAsync();
|
||||
|
||||
await Task.WhenAll(frameTask, healthTask, commandBoundaryTask).ConfigureAwait(false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue