private static void EnsureCache() { if (_ymlSystemsCache == null) { _ymlSystemsCache = new SimpleYml <YmlSystem>(Encoding.UTF8.GetString(Properties.Resources.configgen_defaults)); } }
public static string GetShader(string yml, string system) { if (_ymlShadersCache == null) { _ymlShadersCache = new SimpleYml <YmlShader>(yml); } return(_ymlShadersCache.Where(i => i.system == system).Select(i => i.shader).FirstOrDefault()); }
private static void EnsureCache() { if (_ymlSystemsCache == null) { if (Environment.Is64BitOperatingSystem) { _ymlSystemsCache = new SimpleYml <YmlSystem>(Encoding.UTF8.GetString(Properties.Resources.configgen_defaults)); } else { _ymlSystemsCache = new SimpleYml <YmlSystem>(Encoding.UTF8.GetString(Properties.Resources.configgen_defaults_32)); } } }