public static ItemResource[] LoadResources(Assembly assembly, LocaleType localeType) { string _Locale = localeType.ToString(); string[] names = assembly.GetManifestResourceNames(); List <string> lst = new List <string>(); string locale = string.Format(".{0}.", _Locale); foreach (string s in names) { if (s.EndsWith(".lng") && s.Contains(locale)) { lst.Add(s); } } names = lst.ToArray(); List <ItemResource> lstResult = new List <ItemResource>(); foreach (String resourcename in names) { ItemResource[] res = LoadResourceByName(assembly, resourcename); lstResult.AddRange(res); } return(lstResult.ToArray()); }
public static ItemResource[] LoadResources(Assembly assembly, LocaleType localeType) { string _Locale = localeType.ToString(); string[] names = assembly.GetManifestResourceNames(); List<string> lst = new List<string>(); string locale = string.Format(".{0}.", _Locale); foreach (string s in names) { if (s.EndsWith(".lng") && s.Contains(locale)) lst.Add(s); } names = lst.ToArray(); List<ItemResource> lstResult = new List<ItemResource>(); foreach (String resourcename in names) { ItemResource[] res = LoadResourceByName(assembly, resourcename); lstResult.AddRange(res); } return lstResult.ToArray(); }
private Uri BuildHistoryUrl(int type, LocaleType locale, string idOrName, OrderType bid) { string apiRelativeUrl = String.Format("history/for/type/{0}/{1}/{2}/bid/{3}", type, locale.ToString().ToLower(), idOrName, (int)bid); Uri apiUrl = new Uri(String.Format(ApiFormat, apiRelativeUrl, String.Empty)); return(apiUrl); }