Esempio n. 1
0
        protected virtual IUserRoleMvoStateCreated Map(ICreateUserRoleMvo c)
        {
            var stateEventId           = new UserRoleMvoEventId(c.UserRoleId, c.UserVersion);
            IUserRoleMvoStateCreated e = NewUserRoleMvoStateCreated(stateEventId);

            e.Version                  = c.Version;
            e.Active                   = c.Active;
            e.UserUserName             = c.UserUserName;
            e.UserAccessFailedCount    = c.UserAccessFailedCount;
            e.UserEmail                = c.UserEmail;
            e.UserEmailConfirmed       = c.UserEmailConfirmed;
            e.UserLockoutEnabled       = c.UserLockoutEnabled;
            e.UserLockoutEndDateUtc    = c.UserLockoutEndDateUtc;
            e.UserPasswordHash         = c.UserPasswordHash;
            e.UserPhoneNumber          = c.UserPhoneNumber;
            e.UserPhoneNumberConfirmed = c.UserPhoneNumberConfirmed;
            e.UserTwoFactorEnabled     = c.UserTwoFactorEnabled;
            e.UserSecurityStamp        = c.UserSecurityStamp;
            e.UserCreatedBy            = c.UserCreatedBy;
            e.UserCreatedAt            = c.UserCreatedAt;
            e.UserUpdatedBy            = c.UserUpdatedBy;
            e.UserUpdatedAt            = c.UserUpdatedAt;
            e.UserActive               = c.UserActive;
            e.UserDeleted              = c.UserDeleted;
            e.CommandId                = c.CommandId;


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


            return(e);
        }
Esempio n. 2
0
        protected UserRoleMvoStateDeleted NewUserRoleMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new UserRoleMvoEventId(_state.UserRoleId, version);
            var e            = NewUserRoleMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Esempio n. 3
0
        protected virtual IUserRoleMvoStateDeleted Map(IDeleteUserRoleMvo c)
        {
            var stateEventId           = new UserRoleMvoEventId(c.UserRoleId, c.UserVersion);
            IUserRoleMvoStateDeleted e = NewUserRoleMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Esempio n. 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserRoleMvoEventId other = obj as UserRoleMvoEventId;

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

            return(true &&
                   Object.Equals(this.UserRoleId, other.UserRoleId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
Esempio n. 5
0
 private UserRoleMvoStateDeleted NewUserRoleMvoStateDeleted(UserRoleMvoEventId stateEventId)
 {
     return(new UserRoleMvoStateDeleted(stateEventId));
 }
Esempio n. 6
0
 private UserRoleMvoStateMergePatched NewUserRoleMvoStateMergePatched(UserRoleMvoEventId stateEventId)
 {
     return(new UserRoleMvoStateMergePatched(stateEventId));
 }
Esempio n. 7
0
 protected UserRoleMvoEventBase(UserRoleMvoEventId stateEventId)
 {
     this.UserRoleMvoEventId = stateEventId;
 }
Esempio n. 8
0
 public UserRoleMvoStateDeleted(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 9
0
 public UserRoleMvoStateMergePatched(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 10
0
 protected UserRoleMvoStateEventBase(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }