コード例 #1
0
 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)));
 }
コード例 #2
0
 public static Task <IType> GetRandomTypeAsync(this ITypeCollection typeCollection, Func <IType, bool> predicate)
 {
     return(typeCollection.Dispatcher.InvokeAsync(() => typeCollection.RandomOrDefault(predicate)));
 }