Skip to content

Game.Modding.Toolchain.DependencyState

Assembly: Game
Namespace: Game.Modding.Toolchain

Type: public enum

Base: System.Enum (backed by System.Int32)

Summary: Represents the lifecycle/installation status of a toolchain dependency (for example, a mod dependency or tool required by the modding toolchain). Used by the modding toolchain to track whether a dependency is present, in the process of being fetched/installed/removed, outdated, or in an unknown/queued state.


Fields

  • Unknown = -1
    Represents an unknown or uninitialized state. Useful as a default to indicate the state has not been determined.

  • Installed (0)
    Indicates the dependency is installed and up-to-date.

  • NotInstalled (1)
    Indicates the dependency is not installed on the system.

  • Outdated (2)
    Indicates the dependency is present but an older version than required.

  • Installing (3)
    Indicates an installation process is currently underway for the dependency.

  • Downloading (4)
    Indicates the dependency is currently being downloaded (separate from install step).

  • Removing (5)
    Indicates an uninstall/removal process is currently underway for the dependency.

  • Queued (6)
    Indicates the dependency operation (install/remove/download) has been queued and will be processed later.

Properties

  • This enum defines no properties. It is a plain enumeration of named integral constants.

Constructors

  • Enums in C# do not declare instance constructors in source. The possible values are defined at compile time by the listed members. The underlying runtime provides default construction behavior (e.g., default(DependencyState) == 0 which corresponds to Installed in this enum unless explicitly set otherwise; note that this enum explicitly sets Unknown = -1).

Methods

  • No custom methods are defined on this enum. Standard System.Enum methods are available, such as:
  • ToString() — returns the name of the current enum value.
  • Enum.TryParse() / Enum.Parse — convert between string and enum.
  • Convert.ToInt32(...) — get underlying integer value.
  • HasFlag(...) — not typically applicable for non-flags enums.

Usage Example

// Check state and take action
DependencyState state = DependencyState.Unknown;

// Example: determining behavior from state
switch (state)
{
    case DependencyState.Unknown:
        // Query the system/toolchain to determine actual state
        break;
    case DependencyState.NotInstalled:
    case DependencyState.Outdated:
        // Schedule download/install
        ScheduleInstall(dependency);
        break;
    case DependencyState.Downloading:
    case DependencyState.Installing:
    case DependencyState.Queued:
        // Show progress or wait
        break;
    case DependencyState.Installed:
        // Normal operation
        break;
    case DependencyState.Removing:
        // Disable features until removal completes
        break;
}