Exemplo n.º 1
0
 public static IAsyncGuard <T> Default <T>(this IAsyncGuard <T> guard, T value) =>
 new DefaultValueAsyncGuadDecorator <IAsyncGuard <T>, T>(value, guard);
Exemplo n.º 2
0
 public AsyncCombinedGuard(IAsyncGuard <T> guard, IAsyncGuard <T> target, GuardCombinationModes combinationType) : base(combinationType)
 {
     this.guard  = guard;
     this.target = target;
 }
Exemplo n.º 3
0
 public static IAsyncGuard <T> DoNotThrow <T>(this IAsyncGuard <T> guard) => new DoNotThrowAsyncGuardDecorator <IAsyncGuard <T>, T>(guard);
Exemplo n.º 4
0
 public static IAsyncGuard <T> Throw <T>(this IAsyncGuard <T> guard, Exception exception) => new ThrowAsyncGuardDecorator <IAsyncGuard <T>, T>(exception, guard);
 public static IAsyncCombinedGuard <T> Combine <T>(this IAsyncGuard <T> guard, IAsyncGuard <T> target, GuardCombinationModes type)
 => new AsyncCombinedGuard <T>(guard, target, type);
 public static IAsyncCombinedGuard <T> Or <T>(this IAsyncGuard <T> guard, IAsyncGuard <T> target)
 => guard.Combine(target, GuardCombinationModes.Or);