/// <summary> /// Invokes an action that returns T on the app thread."/> /// </summary> /// <typeparam name="T">The return type</typeparam> /// <param name="act">the action that returns the type</param> /// <returns>value from the invoke.</returns> public T InvokeReturn <T>(ActionWithReturn <T> act) { var item = default(T); Invoke(new MethodInvoker(() => { item = act(); })); return(item); }
internal CombinatorialEnumerator(IEnumerator e, ActionWithReturn p) { this.e = e; this.p = p; }
public static void RunAsync(ActionWithReturn action, ActionWithArgs onDone) { RunAsync(new ActionWithReturn[] { action }, onDone); }
internal CombinatorialEnumerable(IEnumerable e, ActionWithReturn p) { this.e = e; this.p = p; }
/// <summary> /// Returns a wrapper around an IEnumerable to return the combined results of the elements and the supplied delegate. /// </summary> /// <param name="e">The IEnumerable object over which you want to Select.</param> /// <param name="a">The delegate to be applied to each element.</param> /// <returns>An IEnunumerable which will return objects after the delegate is applied.</returns> public static IEnumerable Select(this IEnumerable e, ActionWithReturn a) { return(new CombinatorialEnumerable(e, a)); }
/// <summary> /// Returns a wrapper around an IEnumerable to return the combined results of the elements and the supplied delegate. /// </summary> /// <param name="e">The IEnumerable object over which you want to Select.</param> /// <param name="a">The delegate to be applied to each element.</param> /// <returns>An IEnunumerable which will return objects after the delegate is applied.</returns> public static IEnumerable Select(this IEnumerable e, ActionWithReturn a) { return new CombinatorialEnumerable(e, a); }