/* Push dispatching into the service layer with a decorator pattern. */
public class MySvcDecorator : IMySvc { private readonly IMySvc _mysvc; private readonly Dispatcher _current = Dispatcher.CurrentDispatcher;
public MySvcDecorator(IMySvc mysvc){//set _mysvc here...;}
public Event Action<T> HeyGui;
void MySvcEventHandler(T mydata)
{
Action dispatch = () => { if(HeyGui != null) HeyGui(mydata); }
_current.BeginInvoke(DispatcherPriority.DataBind, dispatch);
}
}