public AnswerArgsEvent(int number, int target, StatusCall status, Guid id) { TelephoneNumber = number; ObjectTelephoneNumber = target; StatusInCall = status; Id = id; }
public void AnswerToCall(int target, StatusCall state, Guid id) { DoAnswerEvent(target, state, id); //вызов события }
public virtual void DoAnswerEvent(int objectNumber, StatusCall status, Guid id) //генерация события { AnswerEvent?.Invoke(this, new AnswerArgsEvent(_number, objectNumber, status, id)); //запуск события }
protected virtual void DoAnswerCallEvent(int number, int objectNumber, StatusCall status) { PortAnswerEvent?.Invoke(this, new AnswerArgsEvent(number, objectNumber, status));//запуск события }
public void AnswerCall(int number, int objectNumber, StatusCall state) { DoAnswerCallEvent(number, objectNumber, state); }