Class AspireResourceDiagnostics

Namespace
XBullet.EasyTesting.Aspire
Assembly
XBullet.EasyTesting.Aspire.dll

State and recent console output for one Aspire resource.

public sealed class AspireResourceDiagnostics
Inheritance
AspireResourceDiagnostics
Inherited Members

Constructors

AspireResourceDiagnostics(string, string?, string?, string?, string?, int?, IReadOnlyList<AspireResourceLogEntry>)

Creates immutable resource diagnostics.

public AspireResourceDiagnostics(string name, string? resourceId, string? resourceType, string? state, string? healthStatus, int? exitCode, IReadOnlyList<AspireResourceLogEntry> logs)

Parameters

name string

The non-empty AppHost resource name.

resourceId string

The runtime resource identifier, or null when none is available.

resourceType string

The Aspire resource type, or null when none is reported.

state string

The Aspire runtime state, or null when no state is reported.

healthStatus string

The Aspire health status, or null when no health status is reported.

exitCode int?

The process exit code, or null when the resource has not exited or no code is available.

logs IReadOnlyList<AspireResourceLogEntry>

The captured log lines in their reported order. The list is retained without being copied; callers should not mutate it after construction.

Properties

ExitCode

Gets the process exit code, when available.

public int? ExitCode { get; }

Property Value

int?

The process exit code when the resource has exited and Aspire reports one; otherwise, null.

HealthStatus

Gets the current health status, when available.

public string? HealthStatus { get; }

Property Value

string

The Aspire health status, or null when no health status is reported.

Logs

Gets bounded recent stdout and stderr lines.

public IReadOnlyList<AspireResourceLogEntry> Logs { get; }

Property Value

IReadOnlyList<AspireResourceLogEntry>

The recent standard-output and standard-error lines in their reported order, limited by the configured maximum. The returned list should be treated as read-only. Log content is not redacted and can contain sensitive data.

Name

Gets the AppHost resource name.

public string Name { get; }

Property Value

string

The non-empty name assigned to the resource in the AppHost model.

ResourceId

Gets the current resource instance identifier, when available.

public string? ResourceId { get; }

Property Value

string

The runtime resource identifier, or null when none is available.

ResourceType

Gets the Aspire resource type, when available.

public string? ResourceType { get; }

Property Value

string

The Aspire resource type, or null when none is reported.

State

Gets the current resource state, when available.

public string? State { get; }

Property Value

string

The Aspire runtime state, or null when no state is reported.