From d32d850a389a110553d3d5be0fec6009fa9a728e Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 07:34:54 +0000 Subject: [PATCH] docs: update custom-resource-commands to use new CommandResults.Success displayImmediately overload Update the 'Auto-open the result dialog in the dashboard' C# example to use the new four-argument CommandResults.Success overload added in microsoft/aspire#16906, replacing the lower-level CommandResultData object-initializer pattern with the more ergonomic factory call. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../docs/fundamentals/custom-resource-commands.mdx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx b/src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx index 3f22f5d34..a98e4656f 100644 --- a/src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx +++ b/src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx @@ -777,7 +777,7 @@ return { ### Auto-open the result dialog in the dashboard -By default, the dashboard surfaces the payload as a **View response** action on the notification in the [notification center](/dashboard/explore/#notification-center). Set `DisplayImmediately` on `CommandResultData` to open the visualizer the moment the command completes — useful for short commands where the response _is_ the point: +By default, the dashboard surfaces the payload as a **View response** action on the notification in the [notification center](/dashboard/explore/#notification-center). Pass `displayImmediately: true` to `CommandResults.Success` to open the visualizer the moment the command completes — useful for short commands where the response _is_ the point: @@ -785,12 +785,9 @@ By default, the dashboard surfaces the payload as a **View response** action on ```csharp title="C# — AppHost.cs" return CommandResults.Success( message: "Access token issued.", - value: new CommandResultData - { - Value = json, - Format = CommandResultFormat.Json, - DisplayImmediately = true, - }); + result: json, + resultFormat: CommandResultFormat.Json, + displayImmediately: true); ```