コード例 #1
0
        public Environment Get(string uri)
        {
            ResolveEnvironmentService();

            try
            {
                var environmentUri = new Uri(uri, UriKind.Absolute);
                var environment    = environmentService.Get(environmentUri);
                return(environment);
            }
            catch (UriFormatException)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
        }
コード例 #2
0
        public async Task <IActionResult> Get()
        {
            var result = await environmentService.Get();

            return(Ok(result));
        }
コード例 #3
0
 public IActionResult Get(int id)
 {
     return(Ok(_service.Get(id)));
 }
コード例 #4
0
        public async Task <IActionResult> Get(Guid environmentId)
        {
            var environment = await _environmentService.Get(environmentId);

            return(Ok(environment));
        }