private void AnalysisTaskJson() { var content = File.ReadAllText(Application.streamingAssetsPath + m_jsonListPath); TaskRoot taskRoot = JsonConvert.DeserializeObject <TaskRoot>(content); foreach (var item in taskRoot.tasks) { Debug.Log(item.m_taskCode); } }
/// <summary> /// Gets Tasks /// </summary> /// <param name="filepath"></param> /// <returns></returns> public List <ITask> GetTask(string filepath) { List <ITask> tasks; try { _taskRoot = XMLHelper.DeSerialize <TaskRoot>(filepath); tasks = new List <ITask>(); if (_taskRoot != null) { foreach (var task in _taskRoot.Tasks) { tasks.Add(task as ITask); } } } catch (Exception ex) { throw ex; } return(tasks); }
// ========================================================= CONSTRUCTION public Domain(string name) { Root = new TaskRoot { Name = name, Parent = null }; }
// ========================================================= CONSTRUCTION public Domain(string name) { Root = new TaskRoot<StateType> { Name = name, Parent = null }; }
public void SetUp() { root = new TaskRoot(); }
public TaskService() { _taskRoot = new TaskRoot(); }