public static void SaveComponentsConfig(ComponentReport components)
 {
     if (Config.IsValid)
     {
         using (StreamWriter w = new StreamWriter(Config.CurrentConfig.BaseComponentsFilePath))
         {
             w.Write(JsonConvert.SerializeObject(components));
         }
     }
 }
        public static ComponentReport LoadComponentsConfig()
        {
            var result = new ComponentReport();

            if (Config.IsValid)
            {
                using (StreamReader r = new StreamReader(Config.CurrentConfig.BaseComponentsFilePath))
                {
                    var json = r.ReadToEnd();
                    result = JsonConvert.DeserializeObject <ComponentReport>(json);
                }
            }
            return(result);
        }