public void SendSms(int receiver, string message) { try { SmsSent.Invoke(this, receiver, message); } catch (Exception ex) { Console.WriteLine("{0}: {1}", this.Number, ex.Message); } }
public void SendSms(int receiver, string message) { try { var operatorMessage = SmsSent.Invoke(this, receiver, message); HandleOperatorResponse(operatorMessage); } catch (Exception ex) { Console.WriteLine("{0}: {1}", this.Number, ex.Message); } }
protected virtual void OnSmsSent(SMSEventArgs e) { SmsSent?.Invoke(this, e); }