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
namestringThe non-empty AppHost resource name.
resourceIdstringThe runtime resource identifier, or null when none is available.
resourceTypestringThe Aspire resource type, or null when none is reported.
statestringThe Aspire runtime state, or null when no state is reported.
healthStatusstringThe Aspire health status, or null when no health status is reported.
exitCodeint?The process exit code, or null when the resource has not exited or no code is available.
logsIReadOnlyList<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
HealthStatus
Gets the current health status, when available.
public string? HealthStatus { get; }
Property Value
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
ResourceType
Gets the Aspire resource type, when available.
public string? ResourceType { get; }
Property Value
State
Gets the current resource state, when available.
public string? State { get; }