using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading.Tasks;
namespace LeanCloud.Storage.Internal {
///
/// Provides helper methods that allow us to use terser code elsewhere.
///
public static class InternalExtensions {
///
/// Ensures a task (even null) is awaitable.
///
///
///
///
public static Task Safe(this Task task) {
return task ?? Task.FromResult(default(T));
}
///
/// Ensures a task (even null) is awaitable.
///
///
///
public static Task Safe(this Task task) {
return task ?? Task.FromResult