Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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)
                   );
        }
Example #5
0
 private UserRoleMvoStateDeleted NewUserRoleMvoStateDeleted(UserRoleMvoEventId stateEventId)
 {
     return(new UserRoleMvoStateDeleted(stateEventId));
 }
Example #6
0
 private UserRoleMvoStateMergePatched NewUserRoleMvoStateMergePatched(UserRoleMvoEventId stateEventId)
 {
     return(new UserRoleMvoStateMergePatched(stateEventId));
 }
Example #7
0
 protected UserRoleMvoEventBase(UserRoleMvoEventId stateEventId)
 {
     this.UserRoleMvoEventId = stateEventId;
 }
Example #8
0
 public UserRoleMvoStateDeleted(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 public UserRoleMvoStateMergePatched(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }
Example #10
0
 protected UserRoleMvoStateEventBase(UserRoleMvoEventId stateEventId) : base(stateEventId)
 {
 }