Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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];
         }
     }
 }