Example #1
0
        public static async Task <string> RunAugmentAsync(IAugmenter augmenter)
        {
            var model = CreateModel();
            var obj   = await augmenter.AugmentAsync(model);

            return(Serialize(obj));
        }
Example #2
0
        public object Augment()
        {
            var model     = Helper.CreateModel();
            var augmented = _augmenter.AugmentAsync(model).Result;

            return(JsonConvert.SerializeObject(augmented));
        }
Example #3
0
            private async Task OnResultExecutionCoreAsync(
                ResultExecutingContext context,
                ResultExecutionDelegate next,
                object value,
                Action <object> setResultObject)
            {
                var augmented = await _augmenter.AugmentAsync(value);

                setResultObject(augmented);
                await next();
            }