Format:
Recent snippets matching tags of EventAggregator
/* some simple helpers to clean up the syntax / remove the need for the Get<Event> pattern. Works with pure poco event classes. Inspired by this post from Ward Bell: http://neverindoubtnet.blogspot.com/2009/07/simplify-prism-event-aggregator.html example usage given an OrderCreated event //Given this event: public class OrderCreated{ public Order Order {get;set;}
1741 Views
no comments
/* See the updated version at: http://codepaste.net/woqq1d which supports mocking. some simple helpers to clean up the syntax / remove the need for the Get<Event> pattern. Works with pure poco event classes. Inspired by this post from Ward Bell: http://neverindoubtnet.blogspot.com/2009/07/simplify-prism-event-aggregator.html example usage given an OrderCreated event
1781 Views
no comments
namespace Nowcom.Quicksilver { public interface IMessage { } } namespace Nowcom.Quicksilver { using System.ComponentModel.Composition;
595 Views
no comments
using System.ComponentModel.Composition; using Microsoft.Practices.Composite.Events; //this version uses a static backing field so that the instance is automatically shared across all containers. public class EventAggregatorPart { private static IEventAggregator _eventAggregator; static EventAggregatorPart() {
1090 Views
no comments
[TestClass] public class MefEventAggregatorTestFixture { [TestMethod] public void Subscriber_is_invoked_when_publisher_raises_event() { var catalog = new InterceptingCatalog( new TypeCatalog(typeof(EventAggregator), typeof (FakePublisher), typeof (MockSubscriber)) ); var container = new CompositionContainer(catalog);
482 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
