public static Task <IUser> GetRandomUserAsync(this IUserCollection userCollection, UserFlags userFlags, Func <IUser, bool> predicate) { return(userCollection.Dispatcher.InvokeAsync(() => userCollection.RandomOrDefault(item => TestFlags(item, userFlags) == true && predicate(item) == true))); }
public static Task <IUser> GetRandomUserAsync(this IUserCollection userCollection, Func <IUser, bool> predicate) { return(userCollection.Dispatcher.InvokeAsync(() => userCollection.RandomOrDefault(predicate))); }