Table of Contents

Class HostShell

Namespace
Valheim.Testing.GameSessions
Assembly
Valheim.Testing.GameSessions.dll

The shell a host runs scripts in, found on the host's PATH (or an absolute path without spaces): Pwsh (PowerShell 7) on a Windows host, Bash on a macOS or Linux host. Nothing else runs host scripts.

public sealed class HostShell
Inheritance
object
HostShell

Constructors

HostShell(HostShellKind, string)

public HostShell(HostShellKind kind, string executable)

Parameters

kind HostShellKind
executable string

Properties

Bash

public static HostShell Bash { get; }

Property Value

HostShell

Executable

public string Executable { get; }

Property Value

string

Kind

public HostShellKind Kind { get; }

Property Value

HostShellKind

Pwsh

public static HostShell Pwsh { get; }

Property Value

HostShell

ThisMachine

This machine's shell: pwsh on Windows, bash elsewhere.

public static HostShell ThisMachine { get; }

Property Value

HostShell

Methods

Parse(string)

bash or pwsh.

public static HostShell Parse(string name)

Parameters

name string

Returns

HostShell

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.