public Chisler GetCalcValue(int threadId, CalcRequestEnum сalcRequest) { Chisler result; lock (SyncRoot) { result = GetСalcValues(сalcRequest).SingleOrDefault(ch => ch.ThreadId == threadId); if (result == null) { result = new Chisler { ThreadId = threadId, Value = 1 }; GetСalcValues(сalcRequest).Add(result); } } return(result); }
public void PutToBug(Chisler value) { _mqBug.TryAdd(value.ThreadId, value); }