ThinkingHome.DeviceModel
ThinkingHome.DeviceModel
CommandOutcome Class
Результат исполнения команды. Адаптеры переводят его в свой формат (у Алисы — action_result).
csharp
public sealed record CommandOutcome : System.IEquatable<ThinkingHome.DeviceModel.CommandOutcome>Inheritance System.Object → CommandOutcome
Implements System.IEquatable<CommandOutcome>
Fields
CommandOutcome.Done Field
Команда выполнена успешно.
csharp
public static readonly CommandOutcome Done;Field Value
CommandOutcome.Unsupported Field
Команда не поддерживается устройством.
csharp
public static readonly CommandOutcome Unsupported;Field Value
Properties
CommandOutcome.ErrorCode Property
Код ошибки (заполнен при Status = Error).
csharp
public System.Nullable<ThinkingHome.DeviceModel.CommandErrorCode> ErrorCode { get; init; }Property Value
System.Nullable<CommandErrorCode>
CommandOutcome.ErrorMessage Property
Диагностическое сообщение для журнала (не для показа пользователю).
csharp
public string? ErrorMessage { get; init; }Property Value
CommandOutcome.Status Property
Статус исполнения.
csharp
public ThinkingHome.DeviceModel.CommandStatus Status { get; init; }Property Value
Methods
CommandOutcome.Error(CommandErrorCode, string) Method
Результат-ошибка с кодом и необязательным сообщением.
csharp
public static ThinkingHome.DeviceModel.CommandOutcome Error(ThinkingHome.DeviceModel.CommandErrorCode code, string? message=null);Parameters
code CommandErrorCode
message System.String