public static RunScript Get(string file) { string json = File.ReadAllText(file); var dic = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(json); var runsc = new RunScript(); runsc.Tasks = dic; runsc.LocalPath = file; return runsc; }
public static RunScript Get(string file) { string json = File.ReadAllText(file); var dic = JsonConvert.DeserializeObject <Dictionary <string, string[]> >(json); var runsc = new RunScript(); runsc.Tasks = dic; runsc.LocalPath = file; return(runsc); }
private static void AddName(Dictionary <string, string[]> dic, RunScript script) { foreach (var item in dic) { if (item.Key == "Name") { script.Name = item.Value[0]; } if (item.Key == "Scope") { script.Scope = item.Value[0]; } } }