Exemplo n.º 1
0
        private UserLoginEventId NewUserLoginEventId(LoginKey loginKey)
        {
            var eId = new UserLoginEventId();

            eId.UserId      = this.UserEventId.UserId;
            eId.LoginKey    = loginKey;
            eId.UserVersion = this.UserEventId.Version;
            return(eId);
        }
Exemplo n.º 2
0
        }// END Map(IMergePatch... ////////////////////////////

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


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

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

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserLoginEventId other = obj as UserLoginEventId;

            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)
                   );
        }
Exemplo n.º 5
0
 private UserLoginStateRemoved NewUserLoginStateRemoved(UserLoginEventId stateEventId)
 {
     return(new UserLoginStateRemoved(stateEventId));
 }
Exemplo n.º 6
0
 private UserLoginStateMergePatched NewUserLoginStateMergePatched(UserLoginEventId stateEventId)
 {
     return(new UserLoginStateMergePatched(stateEventId));
 }
Exemplo n.º 7
0
 protected UserLoginStateEventDtoBase(UserLoginEventId stateEventId)
 {
     this.UserLoginEventId = stateEventId;
 }
Exemplo n.º 8
0
		public UserLoginStateRemoved (UserLoginEventId stateEventId) : base(stateEventId)
		{
		}
Exemplo n.º 9
0
		public UserLoginStateMergePatched (UserLoginEventId stateEventId) : base(stateEventId)
		{
		}
Exemplo n.º 10
0
		public UserLoginStateCreated (UserLoginEventId stateEventId) : base(stateEventId)
		{
		}
Exemplo n.º 11
0
 protected UserLoginStateEventBase(UserLoginEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 12
0
        protected UserLoginEventId NewUserLoginEventId(LoginKey loginKey)
        {
            var stateEventId = new UserLoginEventId(this.UserEventId.UserId, loginKey, this.UserEventId.Version);

            return(stateEventId);
        }