public void OnNewMail(object sender, NewMailEventArgs args) { Monitor.Enter(this); this._mailEventLog.PrintArgsMember(args); Monitor.Exit(this); }
public void OnNewMailEvent(NewMailEventArgs args) { var tempHandler = Volatile.Read(ref this.NewMailHandler); tempHandler?.Invoke(this, args); }