Ejemplo n.º 1
0
        public JsonResult GetStatus(IEnumerable <string> buildTypeIds)
        {
            try
            {
                var buildStatus = _domain.GetBuildStatus(buildTypeIds);

                return(Json(buildStatus, JsonRequestBehavior.AllowGet));
            }
            catch (System.Net.WebException ex)
            {
                Debug.WriteLine(ex.Message);

                var builds = buildTypeIds.Select(buildTypeId => new Build
                {
                    TypeId = buildTypeId
                }).ToList();

                return(Json(builds, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(ex.Message, JsonRequestBehavior.AllowGet));
            }
        }