namespace FrameworkBLL.DirectAction { public class DirectActionResult { public bool Success { get; private set; } public bool FlowStarted { get; private set; } public string? ErrorMessage { get; private set; } /// Set when FlowStarted — the caller (ActionExecuteEndpoint) redirects here /// (the HTML stepper) instead of rendering the static remarks form / success page. public string? RedirectUrl { get; private set; } private DirectActionResult() { } public static DirectActionResult Ok() => new() { Success = true }; public static DirectActionResult ConversationStarted(string redirectUrl) => new() { Success = true, FlowStarted = true, RedirectUrl = redirectUrl }; public static DirectActionResult Fail(string error) => new() { Success = false, ErrorMessage = error }; } }