Пример #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);
    }
Пример #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);
 }
Пример #3
0
 private void OnDataPublisher(string args)
 {
     DataPublisher?.Invoke(this, args);
 }