Beispiel #1
0
 private bool TrySetBuildMap(string buildMapJson)
 {
     try
     {
         _jBuilds = JsonConvert.DeserializeObject <JBuilds>(buildMapJson);
         return(true);
     }
     catch (Exception e)
     {
         Log.WarnFormat("Could not parse build map");
         Log.DebugFormat("{0}\n{1}", buildMapJson, e);
         return(false);
     }
 }
Beispiel #2
0
 private bool TrySetRegistryBuildMap()
 {
     try
     {
         var json = _configuration.GetKSPBuilds();
         if (json != null)
         {
             _jBuilds = json;
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         Log.WarnFormat("Could not retrieve build map from configuration");
         Log.Debug(e);
         return(false);
     }
 }