Beispiel #1
0
        public List <ClientState> GetStates(params LiveState[] states)
        {
            if (null != ClientStates && ClientStates.Any() && states.Length > 0)
            {
                return(ClientStates.Where(x => states.Contains(x.Status)).ToList());
            }

            return(new List <ClientState>());
        }
Beispiel #2
0
 public bool IsInState(params LiveState[] states)
 {
     if (null != ClientStates && ClientStates.Any() && states.Length > 0)
     {
         var found = ClientStates.Where(x => states.Contains(x.Status)).ToList();
         return(found.Count == states.Length);
     }
     return(false);
 }
Beispiel #3
0
        public bool IsInAnyState(Guid indexId, params LiveState[] states)
        {
            if (null != ClientStates && ClientStates.Any(x => null != x.IndexClientId && x.IndexClientId == indexId) &&
                states.Length > 0)
            {
                var found = ClientStates.Where(x => states.Contains(x.Status) && x.IndexClientId == indexId).ToList();
                return(found.Count > 0);
            }

            return(false);
        }