Ejemplo n.º 1
0
        public static ValueTask <TResult> FromException <TResult>(Exception exception)
        {
#if NET50 || LESSTHAN_NET45
            return(ValueTask.FromException <TResult>(exception));
#elif GREATERTHAN_NET45 || GREATERTHAN_NETSTANDARD12 || TARGETS_NETCORE
            return(new ValueTask <TResult>(Task.FromException <TResult>(exception)));
#else
            return(new ValueTask <TResult>(TaskExEx.FromException <TResult>(exception)));
#endif
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a value task that has completed with the specified exception.
 /// </summary>
 public static SystemTasks.ValueTask <TResult> FromException <TResult>(Exception exception) =>
 SystemValueTask.FromException <TResult>(exception);
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a value task that has completed with the specified exception.
 /// </summary>
 public static SystemValueTask FromException(Exception exception) => SystemValueTask.FromException(exception);