Esempio n. 1
0
        protected virtual IUomTypeStateMergePatched Map(IMergePatchUomType c)
        {
            var stateEventId            = new UomTypeEventId(c.UomTypeId, c.Version);
            IUomTypeStateMergePatched e = NewUomTypeStateMergePatched(stateEventId);

            e.ParentTypeId = c.ParentTypeId;
            e.HasTable     = c.HasTable;
            e.Description  = c.Description;
            e.Active       = c.Active;
            e.IsPropertyParentTypeIdRemoved = c.IsPropertyParentTypeIdRemoved;
            e.IsPropertyHasTableRemoved     = c.IsPropertyHasTableRemoved;
            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);
        }
Esempio n. 2
0
        protected UomTypeStateDeleted NewUomTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new UomTypeEventId(_state.UomTypeId, version);
            var e            = NewUomTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Esempio n. 3
0
        protected virtual IUomTypeStateDeleted Map(IDeleteUomType c)
        {
            var stateEventId       = new UomTypeEventId(c.UomTypeId, c.Version);
            IUomTypeStateDeleted e = NewUomTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Esempio n. 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UomTypeEventId other = obj as UomTypeEventId;

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

            return(true &&
                   Object.Equals(this.UomTypeId, other.UomTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Esempio n. 5
0
 protected UomTypeStateEventDtoBase(UomTypeEventId stateEventId)
 {
     this.UomTypeEventId = stateEventId;
 }
Esempio n. 6
0
 private UomTypeStateDeleted NewUomTypeStateDeleted(UomTypeEventId stateEventId)
 {
     return(new UomTypeStateDeleted(stateEventId));
 }
Esempio n. 7
0
 private UomTypeStateMergePatched NewUomTypeStateMergePatched(UomTypeEventId stateEventId)
 {
     return(new UomTypeStateMergePatched(stateEventId));
 }
Esempio n. 8
0
 public UomTypeStateDeleted(UomTypeEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 9
0
 public UomTypeStateMergePatched(UomTypeEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 10
0
 public UomTypeStateCreated(UomTypeEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 11
0
 protected UomTypeStateEventBase(UomTypeEventId stateEventId) : base(stateEventId)
 {
 }