예제 #1
0
        new public void GetDictionary(string project, string app, string format)
        {
            try
            {
                format = "jsonld";

                if (IsAsync())
                {
                    string statusUrl = _abstractPrivder.AsyncGetDictionary(project, app);
                    WebOperationContext.Current.OutgoingResponse.StatusCode          = HttpStatusCode.Accepted;
                    WebOperationContext.Current.OutgoingResponse.Headers["location"] = statusUrl;
                }
                else
                {
                    DataDictionary dataDictionary = _abstractPrivder.GetDictionary(project, app);
                    _abstractPrivder.FormatOutgoingMessage <DataDictionary>(dataDictionary, format, true);
                }
            }
            catch (Exception ex)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.InternalServerError;
                HttpContext.Current.Response.ContentType = "text/plain";
                HttpContext.Current.Response.Write(ex.Message);
            }
        }