コード例 #1
0
 public void TranslationHtml(string html, Action<List<QuickTrainData>> callback)
 {
     List<QuickTrainData> stationsList = new List<QuickTrainData>();
     var stations = JSON.decode(html) as object[];
     for (int i = 0; i < stations.Length; i++)
     {
         var jobj = stations[i] as JavaScriptObject;
         var station = new QuickTrainData(jobj);
         stationsList.Add(station);
     }
     if (stationsList != null)
         callback(stationsList);
 }
コード例 #2
0
        public void TranslationHtml(string html, Action <List <QuickTrainData> > callback)
        {
            List <QuickTrainData> stationsList = new List <QuickTrainData>();
            var stations = JSON.decode(html) as object[];

            for (int i = 0; i < stations.Length; i++)
            {
                var jobj    = stations[i] as JavaScriptObject;
                var station = new QuickTrainData(jobj);
                stationsList.Add(station);
            }
            if (stationsList != null)
            {
                callback(stationsList);
            }
        }