public void GetTipMapping(string project, string app, string format)
        {
            try
            {
                format = "jsonld";

                if (IsAsync())
                {
                    string statusUrl = _abstractPrivder.AsyncGetTipMapping(project, app);
                    WebOperationContext.Current.OutgoingResponse.StatusCode          = HttpStatusCode.Accepted;
                    WebOperationContext.Current.OutgoingResponse.Headers["location"] = statusUrl;
                }
                else
                {
                    TipMapping tipDictionary = _abstractPrivder.GetTipMapping(project, app, format);
                    _abstractPrivder.FormatOutgoingMessage <TipMapping>(tipDictionary, format, true);
                }
            }
            catch (Exception ex)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.InternalServerError;
                HttpContext.Current.Response.ContentType = "text/plain";
                HttpContext.Current.Response.Write(ex.Message);
            }
        }
        public void GenerateTIP(string project, string app, string resource)
        {
            TipMapping context = _abstractPrivder.GenerateTIP(project, app, resource);

            _abstractPrivder.FormatOutgoingMessage <TipMapping>(context, "json", true);
        }
Beispiel #3
0
 public BasePart7ProjectionEngine(AdapterSettings settings, DataDictionary dictionary, TipMapping tipMapping)
     : this(settings, dictionary, (Mapping)null)
 {
     _tipMapping = tipMapping;
 }