コード例 #1
0
 /// <summary>
 /// Invokes the specified action using the specified invokation wrapper
 /// by turning action into function returning nothing.
 /// </summary>
 /// <param name="wrapper">The service wrapper to be used for invoking the
 /// specified action.</param>
 /// <param name="invokationTarget">The action to be invoked.</param>
 public static void Invoke(
     this IInvocationWrapper wrapper,
     Action invokationTarget)
 {
     wrapper.Invoke(invokationTarget.ToFunc());
 }
コード例 #2
0
 public static Unit If(System.Func <bool> predicate, System.Action trueAction, System.Action falseAction)
 => predicate() ? trueAction.ToFunc().Invoke() : falseAction.ToFunc().Invoke();