Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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)
                   );
        }
Exemple #5
0
 private PermissionStateDeleted NewPermissionStateDeleted(PermissionEventId stateEventId)
 {
     return(new PermissionStateDeleted(stateEventId));
 }
Exemple #6
0
 private PermissionStateMergePatched NewPermissionStateMergePatched(PermissionEventId stateEventId)
 {
     return(new PermissionStateMergePatched(stateEventId));
 }
 protected PermissionStateEventDtoBase(PermissionEventId stateEventId)
 {
     this.PermissionEventId = stateEventId;
 }
Exemple #8
0
 public PermissionStateDeleted(PermissionEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #9
0
 public PermissionStateMergePatched(PermissionEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #10
0
 protected PermissionStateEventBase(PermissionEventId stateEventId) : base(stateEventId)
 {
 }