コード例 #1
0
 /// <summary>Qualify an object.</summary>
 /// <typeparam name="T">The type of the objects to qualify.</typeparam>
 /// <param name="current">The current <see cref="AsyncQualifier{T}"/> implementation.</param>
 /// <param name="object">An object to qualify.</param>
 /// <param name="token">A <see cref="CancellationToken"/> object.</param>
 /// <returns>
 /// A value indicating whether or not object is qualified.
 /// </returns>
 public static Task <bool> QualifyAsync <T>(
     this AsyncQualifier <T> current,
     T @object,
     CancellationToken token
     )
 {
     return(current.Invoke(@object, token));
 }
コード例 #2
0
 public async Task <bool> QualifyAsync(T @object, CancellationToken token)
 {
     return(false == await qualifier.Invoke(@object, token).ConfigureAwait(false));
 }
コード例 #3
0
 public async Task <bool> QualifyAsync(T @object, CancellationToken token)
 {
     return(await left.Invoke(@object, token).ConfigureAwait(false) ||
            await right.Invoke(@object, token).ConfigureAwait(false));
 }