public static Task <IType> GetRandomTypeAsync(this ITypeCollection typeCollection, TypeFlags typeFlags, Func <IType, bool> predicate) { return(typeCollection.Dispatcher.InvokeAsync(() => typeCollection.RandomOrDefault(item => TypeFlagsUtility.Test(item, typeFlags) == true && predicate(item) == true))); }
public static Task <IType> GetRandomTypeAsync(this ITypeCollection typeCollection, Func <IType, bool> predicate) { return(typeCollection.Dispatcher.InvokeAsync(() => typeCollection.RandomOrDefault(predicate))); }