コード例 #1
0
        public virtual void When(ILocatorStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
コード例 #2
0
        public virtual LocatorStateDeletedDto ToLocatorStateDeletedDto(ILocatorStateDeleted e)
        {
            var dto = new LocatorStateDeletedDto();

            dto.StateEventId = new LocatorStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;

            return(dto);
        }
コード例 #3
0
        protected virtual ILocatorStateDeleted Map(IDeleteLocator c)
        {
            var stateEventId       = new LocatorEventId(c.LocatorId, c.Version);
            ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
コード例 #4
0
ファイル: LocatorAggregate.cs プロジェクト: zhoufoxcn/wms-2
        protected virtual ILocatorStateDeleted Map(IDeleteLocator c)
        {
            var stateEventId       = new LocatorStateEventId(c.LocatorId, c.Version);
            ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
コード例 #5
0
ファイル: LocatorAggregate.cs プロジェクト: 573000126/wms-4
        protected virtual ILocatorStateDeleted Map(IDeleteLocator c)
        {
            var stateEventId       = new LocatorStateEventId(c.LocatorId, c.Version);
            ILocatorStateDeleted e = NewLocatorStateDeleted(stateEventId);

            ReflectUtils.CopyPropertyValue("CommandId", c, e);


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


            return(e);
        }
コード例 #6
0
 void ILocatorState.When(ILocatorStateDeleted e)
 {
     throw new NotSupportedException();
 }
コード例 #7
0
 public void AddLocatorEvent(ILocatorStateDeleted e)
 {
     _innerStateEvents.Add((LocatorStateDeletedDto)e);
 }
コード例 #8
0
        public virtual void Delete(IDeleteLocator c)
        {
            ILocatorStateDeleted e = Map(c);

            Apply(e);
        }