Ejemplo n.º 1
0
        public static void FormatUrls(this NotificationVMList vm)
        {
            var helper = new System.Web.Mvc.UrlHelper(System.Web.HttpContext.Current.Request.RequestContext);

            for (int i = 0; i < vm.List.Count; i++)
            {
                if (string.IsNullOrEmpty(vm.List[i].JsonUrl))
                {
                    continue;
                }
                var url = Newtonsoft.Json.JsonConvert.DeserializeObject <Url>(vm.List[i].JsonUrl);
                vm.List[i].Url = helper.AbsoluteAction(url);
            }
        }