public static async Task <T> Set <T, TValue>(this Task <T> arg, Expression <Func <T, TValue> > expression, Func <T, TValue> value) { var a = await arg; ObjectFunc.GetOrAddSetLambda(expression).Invoke(a, value(a)); return(a); }
public static async Task <T> Set <T, TValue>(this T arg, Expression <Func <T, TValue> > expression, Task <TValue> value) { ObjectFunc.GetOrAddSetLambda(expression).Invoke(arg, await value); return(arg); }