Skip to content

PgBackgroundWorkerState

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Holds an owned snapshot of a dynamic worker’s state and its PID when running.

public readonly struct PgBackgroundWorkerState : IEquatable<PgBackgroundWorkerState>

Implements: IEquatable<PgBackgroundWorkerState>

PgBackgroundWorkerState(PgBackgroundWorkerStatus, int?)

Section titled “PgBackgroundWorkerState(PgBackgroundWorkerStatus, int?)”

Holds an owned snapshot of a dynamic worker’s state and its PID when running.

public PgBackgroundWorkerState(PgBackgroundWorkerStatus Status, int? ProcessId)

Parameters:

Status — PgBackgroundWorkerStatus

The observed state.

ProcessId — int?

The running process identifier, or null when no running process was observed.

Deconstruct(out PgBackgroundWorkerStatus, out int?)

Section titled “Deconstruct(out PgBackgroundWorkerStatus, out int?)”
public void Deconstruct(out PgBackgroundWorkerStatus Status, out int? ProcessId)

Parameters:

Status — PgBackgroundWorkerStatus

ProcessId — int?

public bool Equals(PgBackgroundWorkerState other)

Parameters:

other — PgBackgroundWorkerState

Returns: bool

public override bool Equals(object obj)

Parameters:

obj — object

Returns: bool

public override int GetHashCode()

Returns: int

public override string ToString()

Returns: string

The running process identifier, or null when no running process was observed.

public int? ProcessId { get; init; }

Value: int?

The observed state.

public PgBackgroundWorkerStatus Status { get; init; }

Value: PgBackgroundWorkerStatus

operator ==(PgBackgroundWorkerState, PgBackgroundWorkerState)

Section titled “operator ==(PgBackgroundWorkerState, PgBackgroundWorkerState)”
public static bool operator ==(PgBackgroundWorkerState left, PgBackgroundWorkerState right)

Parameters:

left — PgBackgroundWorkerState

right — PgBackgroundWorkerState

Returns: bool

operator !=(PgBackgroundWorkerState, PgBackgroundWorkerState)

Section titled “operator !=(PgBackgroundWorkerState, PgBackgroundWorkerState)”
public static bool operator !=(PgBackgroundWorkerState left, PgBackgroundWorkerState right)

Parameters:

left — PgBackgroundWorkerState

right — PgBackgroundWorkerState

Returns: bool