Esempio n. 1
0
        void InvalidateItem(string type)
        {
            var item = AllGroups.SelectMany(x => x.Items).FirstOrDefault(x => x.ID == type);

            if (item == null)
            {
                return;
            }
            item.NotifyIsSelectedChanged();
        }
Esempio n. 2
0
        /// <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));
        }
Esempio n. 3
0
 /// <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)));
 }