Exemple #1
0
        public async Task <ActionResult> Index(string docId)
        {
            if (string.IsNullOrEmpty(docId))
            {
                return(new NotFoundResult());
            }

            try
            {
                var result = await _service.GetApiInformationAsync(docId);

                return(View(result.Response));
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                return(new NotFoundResult());
            }
        }
Exemple #2
0
 private static async Task<ApiInformation> GetApi(IApiPortService service, string apiDocId)
 {
     var response = await service.GetApiInformationAsync(apiDocId);
     return response.Response;
 }