예제 #1
0
 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))));
 }
예제 #2
0
 public static Task <ITypeItem> GetRandomTypeItemAsync(this ITypeContext typeContext, Func <ITypeItem, bool> predicate)
 {
     return(typeContext.Dispatcher.InvokeAsync(() => typeContext.RandomOrDefault(predicate)));
 }