Exemplo n.º 1
0
 /// <summary>
 /// Returns the core settings for a core
 /// </summary>
 /// <returns>null if no settings were saved, or there was an error deserializing</returns>
 public static TSetting GetCoreSettings <TCore, TSetting>(this Config config)
     where TCore : IEmulator
 {
     return((TSetting)config.GetCoreSettings(typeof(TCore), typeof(TSetting)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns the core settings for a core
 /// </summary>
 /// <param name="config"></param>
 /// <typeparam name="TCore"></typeparam>
 /// <returns>null if no settings were saved, or there was an error deserializing</returns>
 public static object GetCoreSettings <TCore>(this Config config)
     where TCore : IEmulator
 {
     return(config.GetCoreSettings(typeof(TCore)));
 }
Exemplo n.º 3
0
 public object GetSettings()
 => _config.GetCoreSettings(typeof(T), _typeS)
 ?? Activator.CreateInstance(_typeS);