コード例 #1
0
        protected virtual IUserPermissionMvoStateCreated Map(ICreateUserPermissionMvo c)
        {
            var stateEventId = new UserPermissionMvoEventId(c.UserPermissionId, c.UserVersion);
            IUserPermissionMvoStateCreated e = NewUserPermissionMvoStateCreated(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);
        }
コード例 #2
0
        protected UserPermissionMvoStateDeleted NewUserPermissionMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new UserPermissionMvoEventId(_state.UserPermissionId, version);
            var e            = NewUserPermissionMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
コード例 #3
0
        protected virtual IUserPermissionMvoStateDeleted Map(IDeleteUserPermissionMvo c)
        {
            var stateEventId = new UserPermissionMvoEventId(c.UserPermissionId, c.UserVersion);
            IUserPermissionMvoStateDeleted e = NewUserPermissionMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
コード例 #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserPermissionMvoEventId other = obj as UserPermissionMvoEventId;

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

            return(true &&
                   Object.Equals(this.UserPermissionId, other.UserPermissionId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
コード例 #5
0
 private UserPermissionMvoStateDeleted NewUserPermissionMvoStateDeleted(UserPermissionMvoEventId stateEventId)
 {
     return(new UserPermissionMvoStateDeleted(stateEventId));
 }
コード例 #6
0
 private UserPermissionMvoStateMergePatched NewUserPermissionMvoStateMergePatched(UserPermissionMvoEventId stateEventId)
 {
     return(new UserPermissionMvoStateMergePatched(stateEventId));
 }
コード例 #7
0
 protected UserPermissionMvoStateEventDtoBase(UserPermissionMvoEventId stateEventId)
 {
     this.UserPermissionMvoEventId = stateEventId;
 }
コード例 #8
0
 public UserPermissionMvoStateDeleted(UserPermissionMvoEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #9
0
 public UserPermissionMvoStateMergePatched(UserPermissionMvoEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #10
0
 protected UserPermissionMvoStateEventBase(UserPermissionMvoEventId stateEventId) : base(stateEventId)
 {
 }