tyler.burd
unread,Aug 10, 2009, 8:09:58 PM8/10/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rhino Tools Dev
Hi all,
I just uploaded a revised patch that implements both the concept of
saga finders and the concept of consuming base types and interfaces.
It is saga_finders_and_consumer_base_types.patch.
The saga finders feature allows any message to trigger a saga, even if
it is not an ISagaMessage. This is useful for when a saga depends on
other sagas or handlers to do it's work, and the messages sent by
those components do not implement ISagaMessage. All you need to do is
create a class such as the following:
public class MySagaFinder : FinderOf<MySaga>.By<SomeMessage>
{
public MySaga FindBy(SomeMessage msg)
{
//find the saga somehow using the msg
}
}
The consumer of base types feature allows you to write ConsumerOf
classes that target base classes or interfaces of messages. So if you
have the following:
-MyMessage
-MyMessage2 : MyMessage
Then this consumer would consume them both:
public class ConsumerOf<MyMessage> {...}
Both of these features borrowed heavily from concepts in NServiceBus.
It was easier to create a patch for both features at once rather than
individually, since they both change the same areas in the code.
Ayende, if you do need them separated to evaluate them, please let me
know.
-tyler burd