public void OnEndedCall(object sender, EndCallEventArgs e) { if (State == PortStates.Calling) { e.Id = CallId; Reset(); Console.WriteLine($"Port {Terminal.PhoneNumber} got response about the end of the call from {e.SourcePhoneNumber}"); EndCallEvent?.Invoke(this, e); } }
public void HandleEndCallEvent(object o, EndCallEventArgs e) { var item = OnGoingCalls.Find(x => e.InitiatorOfEnd == x.Caller || e.InitiatorOfEnd == x.Receiver); if (item != null) { item.SetTimeOfEnd(e.TimeOfEndCall); Abonents.FinishedCalls.Add(item); e.SetEndedCall(item); OnGoingCalls.Remove(item); item.Caller.ChangeCallStatus(StatusOfCall.Avaliable); item.Receiver.ChangeCallStatus(StatusOfCall.Avaliable); } }
public void HandleEndCallEvent(object o, EndCallEventArgs e) { OnEndingCall(e); }
protected virtual void OnEndingCall(EndCallEventArgs e) { EndingCall.Invoke(this, e); }
private void EndCall(object sender, EndCallEventArgs e) { RaiseEndCallEvent(e.Id, e.TelephoneNumber); }
public void HandleCostOfCall(object o, EndCallEventArgs e) { Payment += e.EndedCall.GetDuretionOfCall().TotalSeconds *Tariff.Cost; }
void terminal_EndCallEvent(object sender, EndCallEventArgs e) { OnEndCallEvent(e.PhoneNumber); }