public static Task <T> LogFailure <T>(
     this TryAsync <T> tryAsync,
     T defaultValue,
     ILogger logger,
     string message,
     params object[] args) =>
 tryAsync.IfFail(
     ex =>
 {
     logger.LogError(ex, message, args);
     return(defaultValue);
 });
Example #2
0
 public static Task <T> ifFail <T>(TryAsync <T> self, T failValue) =>
 self.IfFail(failValue);
Example #3
0
 public static ExceptionMatchAsync <T> ifFail <T>(TryAsync <T> self) =>
 self.IfFail();
Example #4
0
 public static Task <T> ifFail <T>(TryAsync <T> self, Func <T> Fail) =>
 self.IfFail(Fail);