Class HostedRunOptions<TPlan>
- Namespace
- Valheim.Testing.GameSessions
- Assembly
- Valheim.Testing.GameSessions.dll
What a mod's runner supplies for a hosted run (MainAsync<TPlan>(string[], HostedRunOptions<TPlan>)): one client hosts a pinned fixture world from its menu, with no dedicated server (#258 step 8).
public sealed class HostedRunOptions<TPlan> where TPlan : class
Type Parameters
TPlan
- Inheritance
-
objectHostedRunOptions<TPlan>
Properties
CheckPlan
The mod's own rules on the plan as it will run (throw System.ArgumentException): a read plan, or a campaign's plan once bound to its prepared actors (RunCampaignAsync<TPlan>(string, TPlan, Func<TPlan, IReadOnlyDictionary<string, ClientRunPlan>>, string, HostedRunOptions<TPlan>)).
public Action<TPlan>? CheckPlan { get; init; }
Property Value
- Action<TPlan>
Host
The plan's hosting client: a ClientRunPlan with its HostWorld section.
public required Func<TPlan, ClientRunPlan> Host { get; init; }
Property Value
- Func<TPlan, ClientRunPlan>
LogScan
The plan's exact known log lines and reasons (ScanLogs(IEnumerable<RunLog>, IReadOnlyDictionary<string, LogClassification>?)); other errors still fail the run.
public Func<TPlan, IReadOnlyDictionary<string, LogClassification>?>? LogScan { get; init; }
Property Value
- Func<TPlan, IReadOnlyDictionary<string, LogClassification>>
Mod
The mod's declaration: its Harmony patches are checked on the host, once it is at its menu, when its pins load the mod.
public required ModDeclaration Mod { get; init; }
Property Value
Name
The runner's name: the report's name and the usage line's program.
public required string Name { get; init; }
Property Value
- string
Provenance
Adds the mod's provenance (scenario details) to the report, before anything is copied.
public Action<TPlan, IDictionary<string, string>>? Provenance { get; init; }
Property Value
- Action<TPlan, IDictionary<string, string>>
ReadPlan
Reads and validates the plan, with the mod's own rules (throw System.ArgumentException).
public required Func<string, TPlan> ReadPlan { get; init; }
Property Value
- Func<string, TPlan>
Scenario
The scenario for host: (session, plan) => Task, given the GameSession whose
Host hosts the fixture world (session.Host.Game), with its report, output and cancellation.
public required Func<GameSession, TPlan, Task> Scenario { get; init; }
Property Value
- Func<GameSession, TPlan, Task>