public override Dictionary<SF, string> GetResources(Uri serverUri)
{
if (serverUri == null) throw new ArgumentNullException("serverUri");
var uri = new Uri(serverUri, "lang/sfgame_en.txt");
var url = uri.ToString();
Func<string> fillResourceDict = () =>
{
try
{
using (var wc = new WebClient())
{
var randomizedUri = new Uri(uri,
"?rnd=" + Random.NextDouble().ToString("N" + 16, CultureInfo.GetCultureInfo("en-US")));
return wc.DownloadString(randomizedUri);
}
}
catch (WebException)
{
throw new NotImplementedException("Network connection lost.");
}
};
return GetResources(url, fillResourceDict);
}