Skip to content
DocsTry Aspire
DocsTry

CommandResults

Classstaticnet8.0
📦 Aspire.Hosting v13.4.0
A factory for ExecuteCommandResult.
namespace Aspire.Hosting.ApplicationModel;
public static class CommandResults
{
// ...
}
Canceledstatic
Produces a canceled result.
Failure(string?)static
Produces an unsuccessful result with an error message.
Failure(string, string, CommandResultFormat)static
Produces an unsuccessful result with an error message and result data.
Failure(string, CommandResultData)static
Produces an unsuccessful result with an error message and a value.
Failure(Exception)static
Produces an unsuccessful result from an Exception. Exception.Message is used as the error message.
Successstatic
Produces a success result.
Success(string)static
Produces a success result.
Success(string, string, CommandResultFormat)static
Produces a success result with a message and result data.
Success(string, string, CommandResultFormat, bool)static
Produces a success result with a message and result data.
Success(string, CommandResultData)static
Produces a success result with a message and a value.
View all methods