123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using RestSharp;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Linq;
- using System.Text;
- using WisdomClient.data;
- namespace WisdomClient
- {
- public class RestfulClient2
- {
- public static TsData[] findHistorySectionByThingCodes(string thingType, string thingId, string[] uCodes, long ts)
- {
- int len = uCodes.Length;
- TsData[] result = new TsData[len];
- Dictionary<string, TsData > respData = RestfulClient.findHistorySectionByThingCodes(thingType, thingId, uCodes, ts);
- for (int i=0;i<len;i++)
- {
- if (respData.ContainsKey(uCodes[i]))
- {
- result[i] = respData[uCodes[i]];
- } else
- {
- result[i] = null;
- }
- }
- return result;
- }
- public static TsData[] findLatestByTagNames(string[] tagNames)
- {
- int len = tagNames.Length;
- TsData[] result = new TsData[len];
- Dictionary<string, TsData> respData = RestfulClient.findLatestByTagNames(tagNames);
- for (int i = 0; i < len; i++)
- {
- if (respData.ContainsKey(tagNames[i]))
- {
- result[i] = respData[tagNames[i]];
- }
- else
- {
- result[i] = null;
- }
- }
- return result;
- }
- }
- }
|