private void DueMessage(Action <ReceieveMessage> action, ReceieveMessage message) { if (action == null) { UnDueMessages.Add(message); return; } action(message); }
private void Teacher_OnReveieveData(ReceieveMessage message) { DueMessage(OnTeacherReceiveMessage, message); }
private void Student_OnReveieveData(ReceieveMessage message) { DueMessage(OnStudentReceiveMessage, message); }