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

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

            dto.DocumentTypeEventId = e.DocumentTypeEventId;
            dto.CreatedAt           = e.CreatedAt;
            dto.CreatedBy           = e.CreatedBy;
            dto.CommandId           = e.CommandId;

            return(dto);
        }
コード例 #3
0
ファイル: DocumentTypeAggregate.cs プロジェクト: uwitec/wms-8
        protected virtual IDocumentTypeStateDeleted Map(IDeleteDocumentType c)
        {
            var stateEventId            = new DocumentTypeEventId(c.DocumentTypeId, c.Version);
            IDocumentTypeStateDeleted e = NewDocumentTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
コード例 #4
0
 public void AddDocumentTypeEvent(IDocumentTypeStateDeleted e)
 {
     _innerStateEvents.Add((DocumentTypeStateDeletedDto)e);
 }
コード例 #5
0
ファイル: DocumentTypeAggregate.cs プロジェクト: uwitec/wms-8
        public virtual void Delete(IDeleteDocumentType c)
        {
            IDocumentTypeStateDeleted e = Map(c);

            Apply(e);
        }
コード例 #6
0
 void IDocumentTypeState.When(IDocumentTypeStateDeleted e)
 {
     throw new NotSupportedException();
 }