Ejemplo n.º 1
0
 public static void Load()
 {
     Config = _config.ReadObject(ModConfig.DefaultConfig());
     Logger.Debug($"First value: {Config.FirstValue}");
     Logger.Debug($"Second value: {Config.SecondValue}");
     Logger.Debug($"SomeFloats: {Config.SomeFloats}");
     Logger.Debug($"SomeDouble: {Config.SomeDouble}");
     Logger.Debug($"Regular list values:\n\t{string.Join("\n\t", Config.RegularList.ToArray())}");
     Logger.Debug($"Custom list values:\n\t{string.Join("\n\t", Config.CustomList.Select(x => x.ToString("\n\t")).ToArray())}");
     Logger.Debug($"Regular dictionary values: \n\t{string.Join("\n\t", Config.RegularDict.Select(x => $"{x.Key}: {x.Value}").ToArray())}");
     Logger.Debug($"Custom dictionary values: \n\t{string.Join("\n\t", Config.CustomDict.Select(x => $"{x.Key}:\n\t\t{x.Value.ToString("\n\t\t")}").ToArray())}");
     Logger.Debug("Changing first value to \"Weeeee\"");
     Config.FirstValue = "Weeeee";
     _config.WriteObject(Config);
 }