Hermod
A cross-platform, modular and fully GDPR-compliant email archival solution!
Loading...
Searching...
No Matches
CommandResult.cs
Go to the documentation of this file.
1using System;
2
4
9
10 private static CommandResult? _empty;
11
15 public static CommandResult Empty => _empty ??= new CommandResult(null, null);
16
17 public CommandResult(string? message, object? result) {
18 Message = message;
19 Result = result;
20 }
21
23 public string? Message { get; }
24
26 public object? Result { get; }
27 }
28}
29
The most basic of CommandResult implementations.
Definition: CommandResult.cs:8
string? Message
An optional message. This message may be written to logs.
static CommandResult Empty
Provides an empty CommandResult for commands which do not require a result.
object? Result
The command's result. The result may be sent over the wire.
CommandResult(string? message, object? result)
A generic, object-based variation of ICommandResult<T>.