I'm having trouble getting EventPublication and EventSubscription to work.
Things compile but the event goes nowhere.
Here's the essentials of the sample application which is simply sending a
string to be passed to the Debug.WriteLine function. I've typed this in from
memory so there could be a typo or two in there but the basic logic should
The original program was created using the new project -> WPF window
public class Logger
[EventSubscription( "TopicTrace", ThreadOption.Publisher )]
public void DoTrace( object sender, DataEventArgs<string> e)
Debug.WriteLine( e.Data );
public partial class Window1 : System.Windows.Window
public event EventHandler<DataEventArgs<string>> DoTrace;
CallTrace(this, "Calling InitializeComponent");
public void CallTrace( object sender, string msg )
if (DoTrace != null)
DoTrace( sender, new DataEventArgs<string>( msg ) );
The code compiles and runs but DoTrace is always null, indicating that the
system never decided that it was necessary to establish the
publish/subscriber relationship. What am I missing?
Richard Lewis Haggard
Please come visit here for a couple thousand good giggles!: www.haggard-and-associates.com/Humor/humor.htm