コード例 #1
0
        protected static async Task <T> GetInfo <T>(string command, string parameter = "")
        {
            var rawResult = await DevicePortalAPIHelper.GetInfosAsync(command, parameter);

            T result = JsonConvert.DeserializeObject <T>(rawResult);

            return(result);
        }
コード例 #2
0
        protected static async Task <Dictionary <string, string> > GetInfo <T>(Dictionary <string, string> returnedInfo, ObjectToDico <T> converter, string command, string parameter = "")
        {
            var rawResult = await DevicePortalAPIHelper.GetInfosAsync(command, parameter);

            T result = JsonConvert.DeserializeObject <T>(rawResult);

            return(await converter(returnedInfo, result));
        }