Example #1
0
        private Response ConnectData(string stage, TProviderResource providerResource)
        {
            TProviderDefinition providerDefinition = GetDefinition(providerResource, true, false);

            if (!providerDefinition.Enable)
            {
                return("{}");
            }

            object   data = _providerFactory.ConnectData(providerDefinition, stage, (IDictionary <string, object>)Request.Query.ToDictionary());
            Response resp = JsonConvert.SerializeObject(data);

            resp.ContentType = "application/json";
            return(resp);
        }