本文整理汇总了C#中Store.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# Store.Remove方法的具体用法?C# Store.Remove怎么用?C# Store.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store.Remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RetrieveSettings
public static Store RetrieveSettings()
{
Uri uri = new Uri(String.Format("http://{0}/store.sh", AppSettings.IPAddress));
GetData(uri, false, (sender, args) => {
AutoResetEvent evt = args.UserState as AutoResetEvent;
if (args.Error == null && !string.IsNullOrEmpty(args.Result))
{
JObject j = JObject.Parse(args.Result);
Store = JsonConvert.DeserializeObject<Store>(args.Result);
Store.Remove("FavLists");
Store.FavLists = new FavLists();
if (j["FavLists"] != null)
{
// We can deserialize this list in one call with JsonConvert.DeserializeObject<FavLists>(j["FavLists"].ToString());
// but we want to correctly "bind" the games in the Favorite lists to the Games in the games list returned in
// data.xml
foreach (JProperty jProperty in j["FavLists"].OfType<JProperty>().Where(p => p.Count > 0))
{
List<Game> games = new List<Game>();
games.AddRange(
jProperty.First.Cast<JObject>().Select(
game =>
Games.FirstOrDefault(
g =>
g.ID.Equals(game["id"].ToString(), StringComparison.InvariantCultureIgnoreCase)))
.Where(favGame => favGame != null));
Store.FavLists.Add(new FavList(games) {HtmlName = jProperty.Name});
}
}
}
if (evt != null) evt.Set();
});
return Store;
}