public static Result Try <TIn>(Action <TIn> action, TIn input, Type loggerType) { var logger = new MongoDbLogger(loggerType); var handler = new DatabaseExceptionHandler(logger); return(handler.Try(action, input)); }
public static Result Try(Action action, Type loggerType) { var logger = new MongoDbLogger(loggerType); var handler = new DatabaseExceptionHandler(logger); return(handler.Try(action)); }
public static Result <TOut> Try <TIn, TOut>(Func <TIn, TOut> function, TIn input, Type loggerType) { var logger = new MongoDbLogger(loggerType); var handler = new DatabaseExceptionHandler(logger); return(handler.Try(function, input)); }
public Result <TOut> Try <TOut>(Func <TOut> function) => _handler.Try(function);