Ejemplo n.º 1
0
 public IViewComponentResult Invoke(object objectToFormat)
 {
     return(View("Show", _stringFormatter.FormatMe(objectToFormat)));
 }
        public async Task <IViewComponentResult> InvokeAsync(object objectToFormat)
        {
            string formatted = await Task.Factory.StartNew(() => { return(_stringFormatter.FormatMe(objectToFormat)); });

            return(View("Show", formatted));
        }