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); }
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); }
public void OnDataPublish(DataPublisherEventArgs <string> args) { DataPublish?.Invoke(this, args); }
public void OnDataPublish(DataPublisherEventArgs <double> args) { DataPublish?.Invoke(this, args); }