Exemple #1
0
    public void OnDataPublisher(MessageArgument <T> arguments)
    {
        // Old way
        //var handler = DataPublisher;
        //if (handler != null)
        //{
        //    handler(this, arguments);
        //}

        // C# 6 way
        DataPublisher?.Invoke(this, arguments);
    }
Exemple #2
0
 /// <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);
 }
Exemple #3
0
 private void OnDataPublisher(string args)
 {
     DataPublisher?.Invoke(this, args);
 }