void InvalidateItem(string type) { var item = AllGroups.SelectMany(x => x.Items).FirstOrDefault(x => x.ID == type); if (item == null) { return; } item.NotifyIsSelectedChanged(); }
/// <summary> /// Gets the list of proxies from HAProxy /// </summary> public static List <Proxy> GetAllProxies() { if (!Current.Settings.HAProxy.Enabled) { return(new List <Proxy>()); } var instances = AllGroups.SelectMany(g => g.Instances).ToList(); return(GetProxies(instances)); }
/// <summary> /// Returns the specified item /// </summary> /// <param name="id">Id to search for</param> /// <returns>Item</returns> public SampleDataItemViewModel GetItem(string id) { return(AllGroups.SelectMany(group => group.Items).FirstOrDefault(item => item.Id.Equals(id))); }