public IEnumerable <Alice> GetAlicesBy(AliceState state) { using (RoundSyncronizerLock.Lock()) { return(Alices.Where(x => x.State == state).ToList()); } }
public IEnumerable <Alice> GetAlicesByNot(AliceState state, bool syncLock = true) { if (syncLock) { using (RoundSyncronizerLock.Lock()) { return(Alices.Where(x => x.State != state).ToList()); } } return(Alices.Where(x => x.State != state).ToList()); }