Exemplo n.º 1
0
 public static T ReadWithDefault <T>(this TomlConfigSettings settings, T defaultInstance)
 {
     using (settings)
     {
         var reader = new TomlConfigReader(settings);
         return((T)reader
                .ReadWithDefault(settings.Data.Stream, defaultInstance)
                .WithOverrides <T>(settings.Overrides));
     }
 }
Exemplo n.º 2
0
 public static T Read <T>(this TomlConfigSettings settings)
 {
     using (settings)
     {
         var reader = new TomlConfigReader(settings);
         return((T)reader
                .Read <T>(settings.Data.Stream, settings.Data.Path)
                .WithOverrides <T>(settings.Overrides));
     }
 }