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)); }
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); } }
private void UpsertNewUserRecoveryCommand(UserUpsertCommand c) { // When recovering set the state of the actor _ActorState = c.UserStateData; }
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; }