예제 #1
0
 public static Dictionary <string, string> GetLogPaths(this ProphecySettings settings)
 {
     return(settings.Services
            .ToDictionary(
                k => k.Key,
                s => settings.GetServiceFullPath(s.Key).Logs));
 }
예제 #2
0
        public static ProphecySettings GetSettings()
        {
            if (settings == null)
            {
                if (!File.Exists(Filename))
                {
                    throw new IOException($"No Prophecy.Api settings file \"{Filename}\"");
                }

                settings = JsonConvert.DeserializeObject <ProphecySettings>(File.ReadAllText(Filename));
            }

            return(settings);
        }