示例#1
0
 public void RejectCall(string sourcePhoneNumber)
 {
     if (isConnectedToPort)
     {
         RejectCallEvent?.Invoke(this, new RejectCallEventArgs(sourcePhoneNumber));
         Console.WriteLine($"Terminal {PhoneNumber} rejected the call{sourcePhoneNumber}");
     }
     else
     {
         throw new ArgumentException("Your terminal didn't connect to terminal");
     }
 }
示例#2
0
 public void OnRejectedCall(object sender, RejectCallEventArgs e)
 {
     Console.WriteLine($"Terminal {_terminalId} got response about rejecting incoming call from {e.SourceNumber}");
     RejectCallEvent?.Invoke(this, e);
 }