예제 #1
0
 private void PostUpsertHandler(UserUpsertCommand c)
 {
     _ActorState = new UserState(PersistenceId, c.UserStateData);
     AutoSaveSnapshot(false);
     _logger.Info($"Updated/Inserted event recorded {_ActorState.DocumentType} for id:{_ActorState.Id}");
     NotifyCommandEventSubscribers(new UserUpsertRecordedEvent(Sender, c, c.User, c.ConnectionId));
 }
예제 #2
0
        public void TranslateExternalUpsertCommandToAkkaMessage(HTTPSourcedCommand cmdExternal)
        {
            UserState cs;

            if (ExtractStateObject(cmdExternal, out cs))
            {
                UserUpsertCommand upsertCmd = new UserUpsertCommand(cs, cmdExternal.User, cmdExternal.ConnectionId);
                SendTo.Tell(upsertCmd, ReplyTo);
            }
        }
예제 #3
0
 private void UpsertNewUserRecoveryCommand(UserUpsertCommand c)
 {
     // When recovering set the state of the actor
     _ActorState = c.UserStateData;
 }
예제 #4
0
 public UserUpsertRecordedEvent(IActorRef sender, UserUpsertCommand c, string user, string connectionId)
     : base(c.Id, null, UserActor.ActorType, MicroServices.Area.User, "User Upsert Recorded", c, user, connectionId)
 {
     Sender = sender;
 }