Ejemplo n.º 1
0
 protected override void SetupMessageDispatcher(StreamMessageDispatchReceiver dispatcher)
 {
     base.SetupMessageDispatcher(dispatcher);
     dispatcher.Register <RemoteItemAddMessage <T> >(ProcessModelItemAddMessage);
     dispatcher.Register <RemoteItemRemoveMessage <T> >(ProcessModelItemRemoveMessage);
     dispatcher.Register <RemoteCollectionChangedMessage>(ProcessRemoteCollectionChangedMessage);
     dispatcher.Register <RemotePropertyChangedMessage>(ProcessRemotePropertyChangedMessage);
 }
Ejemplo n.º 2
0
 public override async Task OnActivateAsync()
 {
     OutputProducer = new StreamMessageSender <ContainerElement <T> >(GetStreamProvider(StreamProviderName), this.GetPrimaryKey());
     StreamMessageDispatchReceiver = new StreamMessageDispatchReceiver(GetStreamProvider(StreamProviderName), GetLogger(), TearDown);
     _streamTransactionReceiver    = new StreamTransactionReceiver(StreamMessageDispatchReceiver);
     StreamMessageDispatchReceiver.Register <ItemMessage <T> >(ProcessItemMessage);
     Elements = new ContainerElementList <T>(this.GetPrimaryKey(), this, this.AsReference <IContainerNodeGrain <T> >());
     await base.OnActivateAsync();
 }