public int Run(string[] talkbackArgs, XRefArguments cmdLineArgs) { if (talkbackArgs != null) { TalkBackChannel.Initialize(talkbackArgs); } XRefArguments.Instance = cmdLineArgs; return(TalkBackInvoke.Action(sender => XRef.Run(cmdLineArgs, sender), MessageReceived) ? 0 : 1); }
static void Main() { TalkBackInvoke.Action(sender => new Class().Do(sender), message => Console.WriteLine(message.Severity + ": " + message.Text)); }