public static async Task <string> RunAugmentAsync(IAugmenter augmenter) { var model = CreateModel(); var obj = await augmenter.AugmentAsync(model); return(Serialize(obj)); }
public object Augment() { var model = Helper.CreateModel(); var augmented = _augmenter.AugmentAsync(model).Result; return(JsonConvert.SerializeObject(augmented)); }
private async Task OnResultExecutionCoreAsync( ResultExecutingContext context, ResultExecutionDelegate next, object value, Action <object> setResultObject) { var augmented = await _augmenter.AugmentAsync(value); setResultObject(augmented); await next(); }