public static Task <ITypeItem> GetRandomTypeItemAsync(this ITypeContext typeContext, Type type, Func <ITypeItem, bool> predicate) { return(typeContext.Dispatcher.InvokeAsync(() => typeContext.RandomOrDefault(item => type.IsAssignableFrom(item.GetType()) && predicate(item)))); }
public static Task <ITypeItem> GetRandomTypeItemAsync(this ITypeContext typeContext, Func <ITypeItem, bool> predicate) { return(typeContext.Dispatcher.InvokeAsync(() => typeContext.RandomOrDefault(predicate))); }