Exemplo n.º 1
0
        protected virtual IPermissionStateMergePatched Map(IMergePatchPermission c)
        {
            var stateEventId = new PermissionEventId(c.PermissionId, c.Version);
            IPermissionStateMergePatched e = NewPermissionStateMergePatched(stateEventId);

            e.Name = c.Name;
            e.ParentPermissionId    = c.ParentPermissionId;
            e.Description           = c.Description;
            e.Active                = c.Active;
            e.IsPropertyNameRemoved = c.IsPropertyNameRemoved;
            e.IsPropertyParentPermissionIdRemoved = c.IsPropertyParentPermissionIdRemoved;
            e.IsPropertyDescriptionRemoved        = c.IsPropertyDescriptionRemoved;
            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);
        }
Exemplo n.º 2
0
        protected PermissionStateDeleted NewPermissionStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new PermissionEventId(_state.PermissionId, version);
            var e            = NewPermissionStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Exemplo n.º 3
0
        protected virtual IPermissionStateDeleted Map(IDeletePermission c)
        {
            var stateEventId          = new PermissionEventId(c.PermissionId, c.Version);
            IPermissionStateDeleted e = NewPermissionStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            PermissionEventId other = obj as PermissionEventId;

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

            return(true &&
                   Object.Equals(this.PermissionId, other.PermissionId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemplo n.º 5
0
 private PermissionStateDeleted NewPermissionStateDeleted(PermissionEventId stateEventId)
 {
     return(new PermissionStateDeleted(stateEventId));
 }
Exemplo n.º 6
0
 private PermissionStateMergePatched NewPermissionStateMergePatched(PermissionEventId stateEventId)
 {
     return(new PermissionStateMergePatched(stateEventId));
 }
Exemplo n.º 7
0
 protected PermissionStateEventDtoBase(PermissionEventId stateEventId)
 {
     this.PermissionEventId = stateEventId;
 }
Exemplo n.º 8
0
 public PermissionStateDeleted(PermissionEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 9
0
 public PermissionStateMergePatched(PermissionEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
 protected PermissionStateEventBase(PermissionEventId stateEventId) : base(stateEventId)
 {
 }