Ejemplo n.º 1
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IUserLoginStateRemoved MapRemove(IRemoveUserLogin c, IUserCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateRemoved e = NewUserLoginStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }// END Map(IRemove... ////////////////////////////
Ejemplo n.º 2
0
        protected virtual IUserLoginStateCreated MapCreate(ICreateUserLogin c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateCreated e = NewUserLoginStateCreated(stateEventId);
            var s = outerState.UserLogins.Get(c.LoginKey);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
Ejemplo n.º 3
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserLoginStateMergePatched MapMergePatch(IMergePatchUserLogin c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserLoginStateEventId(c.UserId, c.LoginKey, version);
            IUserLoginStateMergePatched e = NewUserLoginStateMergePatched(stateEventId);
            var s = outerState.UserLogins.Get(c.LoginKey);

            e.Active = c.Active;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
Ejemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserLoginStateEventId other = obj as UserLoginStateEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.LoginKey, other.LoginKey) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
Ejemplo n.º 5
0
        protected UserLoginStateEventId NewUserLoginStateEventId(LoginKey loginKey)
        {
            var stateEventId = new UserLoginStateEventId(this.StateEventId.UserId, loginKey, this.StateEventId.Version);

            return(stateEventId);
        }
Ejemplo n.º 6
0
 public UserLoginStateEventIdDto(UserLoginStateEventId val)
 {
     this._value = val;
 }
Ejemplo n.º 7
0
 protected UserLoginStateEventBase(UserLoginStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Ejemplo n.º 8
0
 public UserLoginStateRemoved(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 9
0
 public UserLoginStateMergePatched(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 10
0
 public UserLoginStateCreated(UserLoginStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 11
0
 private UserLoginStateRemoved NewUserLoginStateRemoved(UserLoginStateEventId stateEventId)
 {
     return(new UserLoginStateRemoved(stateEventId));
 }
Ejemplo n.º 12
0
 private UserLoginStateMergePatched NewUserLoginStateMergePatched(UserLoginStateEventId stateEventId)
 {
     return(new UserLoginStateMergePatched(stateEventId));
 }