Пример #1
0
        protected RolePermissionStateDeleted NewRolePermissionStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new RolePermissionEventId(_state.Id, version);
            var e            = NewRolePermissionStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Пример #2
0
        protected virtual IRolePermissionStateDeleted Map(IDeleteRolePermission c)
        {
            var stateEventId = new RolePermissionEventId(c.Id, c.Version);
            IRolePermissionStateDeleted e = NewRolePermissionStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            RolePermissionEventId other = obj as RolePermissionEventId;

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

            return(true &&
                   Object.Equals(this.Id, other.Id) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Пример #4
0
        protected virtual IRolePermissionStateMergePatched Map(IMergePatchRolePermission c)
        {
            var stateEventId = new RolePermissionEventId(c.Id, c.Version);
            IRolePermissionStateMergePatched e = NewRolePermissionStateMergePatched(stateEventId);

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

            e.CommandId = c.CommandId;


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

            var version = c.Version;


            return(e);
        }
Пример #5
0
 protected RolePermissionStateEventDtoBase(RolePermissionEventId stateEventId)
 {
     this.RolePermissionEventId = stateEventId;
 }
Пример #6
0
 public RolePermissionStateDeleted(RolePermissionEventId stateEventId) : base(stateEventId)
 {
 }
Пример #7
0
 public RolePermissionStateMergePatched(RolePermissionEventId stateEventId) : base(stateEventId)
 {
 }
Пример #8
0
 protected RolePermissionStateEventBase(RolePermissionEventId stateEventId) : base(stateEventId)
 {
 }
Пример #9
0
 private RolePermissionStateDeleted NewRolePermissionStateDeleted(RolePermissionEventId stateEventId)
 {
     return(new RolePermissionStateDeleted(stateEventId));
 }
Пример #10
0
 private RolePermissionStateMergePatched NewRolePermissionStateMergePatched(RolePermissionEventId stateEventId)
 {
     return(new RolePermissionStateMergePatched(stateEventId));
 }