public void PublishData(double data)
        {
            double _data = _calculator.Addition(data, 100);

            DataPublisherEventArgs <double> message = (DataPublisherEventArgs <double>)Activator.CreateInstance(typeof(DataPublisherEventArgs <double>), new object[] { _data });

            OnDataPublish(message);
        }
示例#2
0
        public void PublishData(string data)
        {
            string _data = string.Empty;

            if (!string.IsNullOrEmpty(data))
            {
                _data = "Upper case of " + data + " is " + data.ToUpper();
            }

            DataPublisherEventArgs <string> message = (DataPublisherEventArgs <string>)Activator.CreateInstance(typeof(DataPublisherEventArgs <string>), new object[] { _data });

            OnDataPublish(message);
        }
示例#3
0
 public void OnDataPublish(DataPublisherEventArgs <string> args)
 {
     DataPublish?.Invoke(this, args);
 }
 public void OnDataPublish(DataPublisherEventArgs <double> args)
 {
     DataPublish?.Invoke(this, args);
 }