You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

customresult_extended.cs 379 B

12345678910
  1. public class MyCustomResult : RuntimeResult
  2. {
  3. public MyCustomResult(CommandError? error, string reason) : base(error, reason)
  4. {
  5. }
  6. public static MyCustomResult FromError(string reason) =>
  7. new MyCustomResult(CommandError.Unsuccessful, reason);
  8. public static MyCustomResult FromSuccess(string reason = null) =>
  9. new MyCustomResult(null, reason);
  10. }