Пример #1
0
        public override Task Tell(byte[] bytes, IActorOwnMessage <string> data, MessageInfo msg)
        {
            var replicatedRef = clientFactory.GetClient().GetGrain <IAccountRep>(data.StateId);
            var task          = replicatedRef.Tell(bytes);

            switch (data)
            {
            case AmountTransferEvent value: return(Task.WhenAll(task, AmountAddEventHandler(value)));

            default: return(task);
            }
        }
Пример #2
0
 public override Task Tell(byte[] bytes, IMessage data, MessageInfo msg)
 {
     if (data is IActorOwnMessage <string> actorData)
     {
         return(clientFactory.GetClient().GetGrain <IAccountDb>(actorData.StateId).Tell(bytes));
     }
     return(Task.CompletedTask);
 }
Пример #3
0
        protected override Task SendToAsyncGrain(byte[] bytes, IEventBase <string> evt)
        {
            var client = clientFactory.GetClient();

            return(Task.WhenAll(
                       client.GetGrain <IAccountRep>(evt.StateId).Tell(bytes),
                       client.GetGrain <IAccountFlow>(evt.StateId).Tell(bytes)
                       ));
        }
Пример #4
0
 public override Task Tell(byte[] bytes, IActorOwnMessage <string> data, MessageInfo msg)
 {
     return(clientFactory.GetClient().GetGrain <IAccountDb>(data.StateId).Tell(bytes));
 }