Esempio n. 1
0
        public async Task <HttpResponseMessage> GetMasterKey()
        {
            var tracer = _traceFactory.GetTracer();

            using (tracer.Step("FunctionsController.GetMasterKey()"))
            {
                return(Request.CreateResponse(HttpStatusCode.OK, await _manager.GetMasterKeyAsync()));
            }
        }
        public async Task <HttpResponseMessage> GetMasterKey()
        {
            var tracer = _traceFactory.GetTracer();

            using (tracer.Step("FunctionsController.GetMasterKey()"))
            {
                try
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, await _manager.GetMasterKeyAsync()));
                }
                catch (InvalidOperationException ex)
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.Conflict, ex));
                }
            }
        }