Files
mxaccessgw/src/MxGateway.Worker/MxAccess/MxAccessShutdownResult.cs
T

21 lines
793 B
C#

using System;
using System.Collections.Generic;
namespace MxGateway.Worker.MxAccess;
public sealed class MxAccessShutdownResult
{
/// <summary>Initializes a new instance of the <see cref="MxAccessShutdownResult"/> class.</summary>
/// <param name="failures">List of failures encountered during graceful shutdown.</param>
public MxAccessShutdownResult(IReadOnlyList<MxAccessShutdownFailure> failures)
{
Failures = failures ?? throw new ArgumentNullException(nameof(failures));
}
/// <summary>Gets the list of shutdown failures.</summary>
public IReadOnlyList<MxAccessShutdownFailure> Failures { get; }
/// <summary>Gets a value indicating whether the shutdown succeeded with no failures.</summary>
public bool Succeeded => Failures.Count == 0;
}