Very elegant. Thanks Ayende. On Sep 30, 9:45 pm, Ayende Rahien <[email protected]> wrote: > public abstact class UserInterfaceConsumer<T> : ConsumerOf<T> > { > public static SyncronizationContext SyncronizationContext { get;set; |} > public void Consume<T>(T msg) > { > SyncronizationContext.Send( delegate { ExecuteInUIThread(msg); }, > null); > } > > public abstract void ExecuteInUIThread(T msg) > { > } > > > > } > On Thu, Sep 30, 2010 at 4:14 AM, John J <[email protected]> wrote: > > > > in reference to #3. What about the SynchronizationContext? Jeremy > > > Miller wrote a MSDN article which touches on the subject. You can use > > > the context to marshal the processing back to the UI thread. > > > Yes, thanks Jason. I was thinking along those lines a bit. When I > > wrote the post I was looking at how easy it would be to do something > > like the following. > > > public class SomeMessageConsumer : ConsumerOf<SomeMessage> { > > [UIThread] > > public void Consume(SomeMessage message) { > > // This happens on the UI thread > > } > > } > > > Where the IReflection implementation was able to check the attribute, > > and if present marshal onto the UI thread. I was figuring that to do > > this I could override the DefaultReflection class. This would be made > > a bit easier if the AbstractRhinoServiceBusFacility checked to see if > > there was already a component registered for IReflection before it > > registered DefaultReflection. All this I can do, but I am still a bit > > "green" with RSB, and thought it would be better to see if anyone out > > there had done anything like this before. > > > As Ayende points out, there are non-trivial issues with transactions > > here as well. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Rhino Tools Dev" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<rhino-tools-dev%2Bunsubscribe@ > > googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rhino-tools-dev?hl=en.
-- You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en.
