コード例 #1
0
 public UserRoleStateEventIdDtoWrapper(UserRoleStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
コード例 #2
0
 public virtual UserRoleStateEventId ToUserRoleStateEventId()
 {
     UserRoleStateEventId v = new UserRoleStateEventId();
     v.UserId = this.UserId;
     v.RoleId = this.RoleId;
     v.UserVersion = this.UserVersion;
     return v;
 }
コード例 #3
0
ファイル: UserAggregate.cs プロジェクト: zhoufoxcn/wms-2
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IUserRoleStateRemoved MapRemove(IRemoveUserRole c, IUserCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId        = new UserRoleStateEventId(c.UserId, c.RoleId, version);
            IUserRoleStateRemoved e = NewUserRoleStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
コード例 #4
0
ファイル: UserAggregate.cs プロジェクト: zhoufoxcn/wms-2
        protected virtual IUserRoleStateCreated MapCreate(ICreateUserRole c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId        = new UserRoleStateEventId(c.UserId, c.RoleId, version);
            IUserRoleStateCreated e = NewUserRoleStateCreated(stateEventId);
            var s = outerState.UserRoles.Get(c.RoleId, true);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
コード例 #5
0
ファイル: UserAggregate.cs プロジェクト: zhoufoxcn/wms-2
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserRoleStateMergePatched MapMergePatch(IMergePatchUserRole c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId             = new UserRoleStateEventId(c.UserId, c.RoleId, version);
            IUserRoleStateMergePatched e = NewUserRoleStateMergePatched(stateEventId);
            var s = outerState.UserRoles.Get(c.RoleId);

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

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
コード例 #6
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserRoleStateEventId other = obj as UserRoleStateEventId;

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

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.RoleId, other.RoleId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
コード例 #7
0
 protected UserRoleStateEventBase(UserRoleStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
コード例 #8
0
 public UserRoleStateRemoved(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #9
0
 public UserRoleStateMergePatched(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #10
0
 public UserRoleStateCreated(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #11
0
 public UserRoleStateEventIdFlattenedDto(UserRoleStateEventId val)
 {
     this._value = new UserRoleStateEventIdDtoWrapper(val);
 }
コード例 #12
0
ファイル: UserStateEvent.cs プロジェクト: zhoufoxcn/wms-2
        protected UserRoleStateEventId NewUserRoleStateEventId(string roleId)
        {
            var stateEventId = new UserRoleStateEventId(this.StateEventId.UserId, roleId, this.StateEventId.Version);

            return(stateEventId);
        }
コード例 #13
0
ファイル: UserAggregate.cs プロジェクト: zhoufoxcn/wms-2
 private UserRoleStateRemoved NewUserRoleStateRemoved(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateRemoved(stateEventId));
 }
コード例 #14
0
ファイル: UserAggregate.cs プロジェクト: zhoufoxcn/wms-2
 private UserRoleStateMergePatched NewUserRoleStateMergePatched(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateMergePatched(stateEventId));
 }