Пример #1
0
 public void Call(int targetNumber)
 {
     if (targetNumber != TelephonNumber)
     {
         OutgoingCallEvent?.Invoke(this, new EventArgsCall(TelephonNumber, targetNumber));
     }
     else
     {
         _help.GetMessageAboutCallYourself(targetNumber);
     }
 }
Пример #2
0
        public void OnOutgoingCall(object sender, CallEventArgs e)
        {
            if (State == PortStates.Connected)
            {
                State = PortStates.Calling;

                e.Id = Guid.NewGuid();

                Console.WriteLine($"Port {e.SourcePhoneNumber} has received an outgoing call request to {e.TargetPhoneNumber}");
                OutgoingCallEvent?.Invoke(sender, e);
            }
        }
Пример #3
0
 private void OutgoingCall(object sender, CallEventArgs e)
 {
     e = new CallEventArgs(Id, e.TargetNumber);
     OutgoingCallEvent?.Invoke(this, e);
 }
Пример #4
0
 /// <summary>
 /// Method to call other client.
 /// </summary>
 /// <param name="targetNumber">Number to call.</param>
 public void Call(int targetNumber)
 {
     OutgoingCallEvent?.Invoke(this, new CallEventArgs(Guid.NewGuid(), targetNumber));
 }