Beispiel #1
0
        public ActionResult CallersChildren(CallersViewStackViewerViewModel model, string name, string path)
        {
            if (string.IsNullOrEmpty(model.Filename))
            {
                throw new ArgumentNullException("filename");
            }

            if (string.IsNullOrEmpty(model.StackType))
            {
                throw new ArgumentNullException("stacktype");
            }

            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (name.Contains("&"))
            {
                name = name.Replace("&", "%26");
            }

            model.TreeNodes = JsonConvert.DeserializeObject <List <TreeNode> >(new HttpClient().GetStringAsync($"{this.LookupHostname()}/stackviewer/callertree?{model}&name={name}&path={path}").Result);

            this.ViewBag.Title = "Callers Viewer";
            return(this.View(model));
        }
Beispiel #2
0
        public ActionResult SourceViewer(CallersViewStackViewerViewModel model, string name, string path)
        {
            if (string.IsNullOrEmpty(model.Filename))
            {
                throw new ArgumentNullException("filename");
            }

            if (string.IsNullOrEmpty(model.StackType))
            {
                throw new ArgumentNullException("stacktype");
            }

            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (name.Contains("&"))
            {
                name = name.Replace("&", "%26");
            }

            return(this.View(JsonConvert.DeserializeObject <SourceInformation>(new HttpClient().GetStringAsync($"{this.LookupHostname()}/stackviewer/source/callertree?{model}&name={name}&path={path}").Result)));
        }