Exemplo n.º 1
0
            public AttachedEventHandler(object model, Action <Event> handler)
            {
                if (!(model is IDomainEventSource))
                {
                    return;
                }

                _model = (IDomainEventSource)model;

                _handler = handler;

                _model.EventRaised += handler;
            }
Exemplo n.º 2
0
 public SubscribeEvent(IDomainEventSource source)
 {
     Source = Observable.FromEvent <Action <IDomainEvent>, IDomainEvent>(d => source.RaiseEvent += d,
                                                                         d => source.RaiseEvent -= d);
     Key = new Tuple <Type, string>(source.GetType(), "RaiseEvent");
 }
Exemplo n.º 3
0
 public IDisposable PublishFromEventSource(IDomainEventSource source)
 {
     return(ListenFromSource(new SubscribeEvent(source)));
 }