示例#1
0
        protected virtual IPermissionStateMergePatched Map(IMergePatchPermission c)
        {
            var stateEventId = new PermissionStateEventId(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 = DateTime.Now;

            var version = c.Version;


            return(e);
        }
 public PermissionStateEventIdDtoWrapper(PermissionStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
        public virtual PermissionStateEventId ToPermissionStateEventId()
        {
            PermissionStateEventId v = new PermissionStateEventId();

            v.PermissionId = this.PermissionId;
            v.Version      = this.Version;
            return(v);
        }
示例#4
0
        protected PermissionStateDeleted NewPermissionStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new PermissionStateEventId(_state.PermissionId, ((IPermissionStateProperties)_state).Version);
            var e            = NewPermissionStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }
示例#5
0
        protected virtual IPermissionStateDeleted Map(IDeletePermission c)
        {
            var stateEventId          = new PermissionStateEventId(c.PermissionId, c.Version);
            IPermissionStateDeleted e = NewPermissionStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
示例#6
0
        protected virtual IPermissionStateCreated Map(ICreatePermission c)
        {
            var stateEventId          = new PermissionStateEventId(c.PermissionId, c.Version);
            IPermissionStateCreated e = NewPermissionStateCreated(stateEventId);

            e.Name = c.Name;
            e.ParentPermissionId = c.ParentPermissionId;
            e.Description        = c.Description;
            e.Active             = c.Active;
            e.CommandId          = c.CommandId;


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


            return(e);
        }
示例#7
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            PermissionStateEventId other = obj as PermissionStateEventId;

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

            return(true &&
                   Object.Equals(this.PermissionId, other.PermissionId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
示例#8
0
 private PermissionStateDeleted NewPermissionStateDeleted(PermissionStateEventId stateEventId)
 {
     return(new PermissionStateDeleted(stateEventId));
 }
示例#9
0
 private PermissionStateMergePatched NewPermissionStateMergePatched(PermissionStateEventId stateEventId)
 {
     return(new PermissionStateMergePatched(stateEventId));
 }
 public PermissionStateEventIdFlattenedDto(PermissionStateEventId val)
 {
     this._value = new PermissionStateEventIdDtoWrapper(val);
 }
示例#11
0
 protected PermissionStateEventBase(PermissionStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
示例#12
0
 public PermissionStateDeleted(PermissionStateEventId stateEventId) : base(stateEventId)
 {
 }
示例#13
0
 public PermissionStateMergePatched(PermissionStateEventId stateEventId) : base(stateEventId)
 {
 }