public static void SetAsyncProp <TKey, TValue>(Store store, RedisKey hashName, TKey field, Async <TValue> value) { value.SetTask = store.Connection.GetDatabase() .HashSetAsync(hashName, ToRedisValue <TKey> .Impl.Value(field), ToRedisValue <TValue> .Impl.Value(value.SetValue)) .ContinueWith(o => value.SetValue); }
public static TaskAwaiter <T> GetAwaiter <T>(this Async <T> toAwait) { return((toAwait.SetTask ?? toAwait.Task).GetAwaiter()); }