Esempio n. 1
0
        public int State()
        {
            int state = 0;

            lock (Calls)
            {
                state += Calls.Count(x => x.RequestId != ObjectId.Empty);
                state += Calls.Count(x => x.ResponseId != ObjectId.Empty);
                state += Tags.Count();
            }
            return(state);
        }
Esempio n. 2
0
        private void CallAgent_Click(object sender, RoutedEventArgs e)
        {
            var maxId     = Calls.Max(a => a.Id);
            var currentId = maxId + 1;
            var newCall   = new Call()
            {
                Id            = currentId,
                DurationInSec = generator.GenerateNumber()
            };

            Calls.Enqueue(newCall);
            LogConsole.Items.Add(consoleService.AddNewCall());
            LogConsole.Items.Add(consoleService.CallInfo(Calls.Count()));
        }
Esempio n. 3
0
 public int GetEqualCallCount(Call call)
 {
     return(Calls.Count(t => t.Equals(call)));
 }