Skip to content

Commit

Permalink
Update E002-messaging-basics/sample-csharp/Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullin committed Sep 12, 2012
1 parent ba6f4ff commit 43c9c3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions E002-messaging-basics/sample-csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ And that is the basics of messaging!
static void ApplyMessage(ProductBasket basket, object message)
{
// this code accepts the message and actually adds the product to the supplied basket.
// we cast both basket and message to dynamic in order
// to dispatch it dynamically to "When" method on basket,
// which specifically can handle this type of the message
// based on the signature
((dynamic) basket).When((dynamic)message);
}

Expand Down

0 comments on commit 43c9c3c

Please sign in to comment.