Class PinnedServerRunOptions<TPlan>
- Namespace
- Valheim.Testing.GameSessions
- Assembly
- Valheim.Testing.GameSessions.dll
What a mod's system-test runner supplies to PinnedServerRun.
public sealed class PinnedServerRunOptions<TPlan> where TPlan : ServerRunPlan
Type Parameters
TPlan
- Inheritance
-
objectPinnedServerRunOptions<TPlan>
Properties
CheckPlan
The mod's own rules on the plan as it will run, for validate and run alike (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, PinnedServerRunOptions<TPlan>)).
public Action<TPlan>? CheckPlan { get; init; }
Property Value
- Action<TPlan>
CleanupBudget
Optional positive cleanup budget for a run whose final server save needs longer than the usual five minutes.
public TimeSpan? CleanupBudget { get; init; }
Property Value
- TimeSpan?
ClientPlans
Owned clients this plan's scenario may open. Declare them so their password-variable sources are checked before the dedicated server or any disposable copy starts; a campaign supplies its own declared clients instead.
public Func<TPlan, IEnumerable<ClientRunPlan>>? ClientPlans { get; init; }
Property Value
- Func<TPlan, IEnumerable<ClientRunPlan>>
Mod
The mod's declaration: its session capability and token variable, and the Harmony patches the session checks at runtime-ready on the server 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: it is recorded even when the game never starts.
public Action<TPlan, IDictionary<string, string>>? Provenance { get; init; }
Property Value
- Action<TPlan, IDictionary<string, string>>
ReadPlan
Reads and validates the plan (for example ServerRunPlan.Read<MyPlan> then the plan's own rules).
public required Func<string, TPlan> ReadPlan { get; init; }
Property Value
- Func<string, TPlan>
Scenario
The scenario for run: (session, plan) => Task, given the GameSession whose strictly pinned
server has started (session.Server.Game), with its report, output and cancellation.
public required Func<GameSession, TPlan, Task> Scenario { get; init; }
Property Value
- Func<GameSession, TPlan, Task>