Ejemplo n.º 1
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IUserPermissionStateRemoved MapRemove(IRemoveUserPermission c, IUserCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserPermissionStateEventId(c.UserId, c.PermissionId, version);
            IUserPermissionStateRemoved e = NewUserPermissionStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
Ejemplo n.º 2
0
        protected virtual IUserPermissionStateCreated MapCreate(ICreateUserPermission c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserPermissionStateEventId(c.UserId, c.PermissionId, version);
            IUserPermissionStateCreated e = NewUserPermissionStateCreated(stateEventId);
            var s = outerState.UserPermissions.Get(c.PermissionId);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
Ejemplo n.º 3
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserPermissionStateMergePatched MapMergePatch(IMergePatchUserPermission c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserPermissionStateEventId(c.UserId, c.PermissionId, version);
            IUserPermissionStateMergePatched e = NewUserPermissionStateMergePatched(stateEventId);
            var s = outerState.UserPermissions.Get(c.PermissionId);

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

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
Ejemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserPermissionStateEventId other = obj as UserPermissionStateEventId;

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

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.PermissionId, other.PermissionId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
 public UserPermissionStateEventIdDto(UserPermissionStateEventId val)
 {
     this._value = val;
 }
Ejemplo n.º 6
0
 protected UserPermissionStateEventBase(UserPermissionStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Ejemplo n.º 7
0
 public UserPermissionStateRemoved(UserPermissionStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 8
0
 public UserPermissionStateMergePatched(UserPermissionStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 9
0
 public UserPermissionStateCreated(UserPermissionStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 10
0
        protected UserPermissionStateEventId NewUserPermissionStateEventId(string permissionId)
        {
            var stateEventId = new UserPermissionStateEventId(this.StateEventId.UserId, permissionId, this.StateEventId.Version);

            return(stateEventId);
        }
Ejemplo n.º 11
0
 private UserPermissionStateRemoved NewUserPermissionStateRemoved(UserPermissionStateEventId stateEventId)
 {
     return(new UserPermissionStateRemoved(stateEventId));
 }
Ejemplo n.º 12
0
 private UserPermissionStateMergePatched NewUserPermissionStateMergePatched(UserPermissionStateEventId stateEventId)
 {
     return(new UserPermissionStateMergePatched(stateEventId));
 }