public void OnDataPublisher(MessageArgument <T> arguments) { // Old way //var handler = DataPublisher; //if (handler != null) //{ // handler(this, arguments); //} // C# 6 way DataPublisher?.Invoke(this, arguments); }
/// <summary> /// Handles publish data, if the handler is not null /// </summary> /// <param name="args"></param> private void OnDataPublisher(MessageArgument <T> args) { DataPublisher?.Invoke(this, args); }
private void OnDataPublisher(string args) { DataPublisher?.Invoke(this, args); }