615b487a77
Adds missing <summary>/<param> XML docs across 99 server, worker, and test files so CommentChecker reports zero issues (TreatWarningsAsErrors needs the analyzer clean). Bundles in WIP dashboard work: NavSection extraction, MainLayout/site.css/js styling alignment, and DashboardOptions/Auth tweaks.
25 lines
961 B
C#
25 lines
961 B
C#
namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
|
|
|
public sealed record DashboardApiKeyManagementResult(
|
|
bool Succeeded,
|
|
string Message,
|
|
string? ApiKey)
|
|
{
|
|
/// <summary>Creates a successful result with an optional API key.</summary>
|
|
/// <param name="message">The success message.</param>
|
|
/// <param name="apiKey">The API key if generated or modified.</param>
|
|
/// <returns>A successful result record.</returns>
|
|
public static DashboardApiKeyManagementResult Success(string message, string? apiKey = null)
|
|
{
|
|
return new DashboardApiKeyManagementResult(true, message, apiKey);
|
|
}
|
|
|
|
/// <summary>Creates a failed result with an error message.</summary>
|
|
/// <param name="message">The error message.</param>
|
|
/// <returns>A failed result record.</returns>
|
|
public static DashboardApiKeyManagementResult Fail(string message)
|
|
{
|
|
return new DashboardApiKeyManagementResult(false, message, null);
|
|
}
|
|
}
|