Add service parameter to GET /Api/ASF

This commit is contained in:
Archi
2021-12-10 14:22:49 +01:00
parent 2513bd4163
commit 78a88979dc

View File

@@ -62,6 +62,13 @@ public sealed class ASFResponse {
[Required]
public DateTime ProcessStartTime { get; private set; }
/// <summary>
/// Boolean value specifying whether ASF has been started with a --service parameter.
/// </summary>
[JsonProperty(Required = Required.Always)]
[Required]
public bool Service { get; private set; }
/// <summary>
/// ASF version of currently running binary.
/// </summary>
@@ -76,5 +83,7 @@ public sealed class ASFResponse {
MemoryUsage = memoryUsage > 0 ? memoryUsage : throw new ArgumentOutOfRangeException(nameof(memoryUsage));
ProcessStartTime = processStartTime > DateTime.MinValue ? processStartTime : throw new ArgumentOutOfRangeException(nameof(processStartTime));
Version = version ?? throw new ArgumentNullException(nameof(version));
Service = Program.Service;
}
}