示例#1
0
        BEAResponse <TResults> CallMethod <TResults>(string method, CallParams callParams)
        {
            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;

            string url = PrepareUrl(method, callParams);

            using (var client = new BEAWebClient())
            {
                var json       = client.DownloadString(url);
                var serializer = new JavaScriptSerializer();
                serializer.RegisterConverters(new JavaScriptConverter[] { new BEAParamValueItemConverter() });
                BEAResponse <TResults> model = serializer.Deserialize <BEAResponse <TResults> >(json);
                return(model);
            }
        }
示例#2
0
        public BEAResponse <BEAGetParameterValues> GetParameterValues(CallParams callParams)
        {
            BEAResponse <BEAGetParameterValues> response = CallMethod <BEAGetParameterValues>("GetParameterValues", callParams);

            return(response);
        }
示例#3
0
        public BEAResponse <BEAGetDataSetList> GetDataSetList(CallParams callParams)
        {
            BEAResponse <BEAGetDataSetList> response = CallMethod <BEAGetDataSetList>("GetDataSetList", callParams);

            return(response);
        }