EnvironmentVariables Property

Definition

Namespace CliInvoke.Core
Assembly CliInvoke.Core.dll

The environment variables to be set.

public IReadOnlyDictionary<string, string> EnvironmentVariables { get; init; }

Returns

Remarks

Any supplied dictionary is captured as an immutable snapshot sorted by key using ordinal comparison. This normalisation makes Equals(ProcessConfiguration?) and GetHashCode() order-independent (two configurations carrying the same variables in a different insertion order are considered equal) and avoids re-sorting on every hash code computation. Because environment variable ordering is irrelevant to the spawned process, this has no effect on process execution. The snapshot also isolates the configuration from later mutations made to the caller's original dictionary.