Пример #1
0
        protected DocumentTypeStateDeleted NewDocumentTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new DocumentTypeEventId(_state.DocumentTypeId, version);
            var e            = NewDocumentTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Пример #2
0
        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);
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            DocumentTypeEventId other = obj as DocumentTypeEventId;

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

            return(true &&
                   Object.Equals(this.DocumentTypeId, other.DocumentTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Пример #4
0
        protected virtual IDocumentTypeStateMergePatched Map(IMergePatchDocumentType c)
        {
            var stateEventId = new DocumentTypeEventId(c.DocumentTypeId, c.Version);
            IDocumentTypeStateMergePatched e = NewDocumentTypeStateMergePatched(stateEventId);

            e.Description          = c.Description;
            e.ParentDocumentTypeId = c.ParentDocumentTypeId;
            e.Active = c.Active;
            e.IsPropertyDescriptionRemoved          = c.IsPropertyDescriptionRemoved;
            e.IsPropertyParentDocumentTypeIdRemoved = c.IsPropertyParentDocumentTypeIdRemoved;
            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);
        }
Пример #5
0
 protected DocumentTypeStateEventDtoBase(DocumentTypeEventId stateEventId)
 {
     this.DocumentTypeEventId = stateEventId;
 }
Пример #6
0
 public DocumentTypeStateDeleted(DocumentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #7
0
 public DocumentTypeStateMergePatched(DocumentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #8
0
 protected DocumentTypeStateEventBase(DocumentTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #9
0
 private DocumentTypeStateDeleted NewDocumentTypeStateDeleted(DocumentTypeEventId stateEventId)
 {
     return(new DocumentTypeStateDeleted(stateEventId));
 }
Пример #10
0
 private DocumentTypeStateMergePatched NewDocumentTypeStateMergePatched(DocumentTypeEventId stateEventId)
 {
     return(new DocumentTypeStateMergePatched(stateEventId));
 }