private void CheckInbox() { while (Inbox.Any()) { var message = Inbox.First.Value; Inbox.RemoveFirst(); switch (message) { case SpeedChangeMessage.Stop: ComputationInfo.IsActive = false; break; case SpeedChangeMessage.SpeedUp: TargetOptCenterParams.RunnerPoolSize = (int)(TargetOptCenterParams.RunnerPoolSize / 2); break; case SpeedChangeMessage.SlowDown: TargetOptCenterParams.RunnerPoolSize *= 2; break; default: break; } } }
public bool ContainsLetter(string id) { if (HasMail) { return(Inbox.Any(x => x.Id == id)); } return(false); }
public bool ContainsAuthor(ulong id) { if (HasMail) { return(Inbox.Any(x => x.Author.Id == id)); } return(false); }
public bool HasLetterAt(int i) { if (HasMail) { return(Inbox.Any(x => Inbox.IndexOf(x) == i)); } return(false); }