/// <summary>
 /// Create a complated <see cref="IAsyncOperationWithProgress{TResult, TProgress}"/>.
 /// </summary>
 /// <param name="results">Results of the operation.</param>
 /// <returns>A complated <see cref="IAsyncOperationWithProgress{TResult, TProgress}"/>.</returns>
 public static IAsyncOperationWithProgress <T, TProgress> CreateCompleted(T results)
 => AsyncOperationCache <TProgress> .TryGetCacehd(results) ?? CompletedAsyncInfo <T, TProgress> .Create(results);
Ejemplo n.º 2
0
 /// <summary>
 /// Create a complated <see cref="IAsyncOperation{TResult}"/>.
 /// </summary>
 /// <param name="results">Results of the operation.</param>
 /// <returns>A complated <see cref="IAsyncOperation{TResult}"/>.</returns>
 public static IAsyncOperation <T> CreateCompleted(T results)
 => AsyncOperationCache <VoidProgress> .TryGetCacehd(results) ?? CompletedAsyncInfo <T, VoidProgress> .Create(results);