Example #1
0
        protected virtual IUomStateMergePatched Map(IMergePatchUom c)
        {
            var stateEventId        = new UomEventId(c.UomId, c.Version);
            IUomStateMergePatched e = NewUomStateMergePatched(stateEventId);

            e.UomTypeId    = c.UomTypeId;
            e.Abbreviation = c.Abbreviation;
            e.Description  = c.Description;
            e.Active       = c.Active;
            e.IsPropertyUomTypeIdRemoved    = c.IsPropertyUomTypeIdRemoved;
            e.IsPropertyAbbreviationRemoved = c.IsPropertyAbbreviationRemoved;
            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);
        }
Example #2
0
        protected UomStateDeleted NewUomStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new UomEventId(_state.UomId, version);
            var e            = NewUomStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Example #3
0
        protected virtual IUomStateDeleted Map(IDeleteUom c)
        {
            var stateEventId   = new UomEventId(c.UomId, c.Version);
            IUomStateDeleted e = NewUomStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            UomEventId other = obj as UomEventId;

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

            return(true &&
                   Object.Equals(this.UomId, other.UomId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Example #5
0
 protected UomStateEventDtoBase(UomEventId stateEventId)
 {
     this.UomEventId = stateEventId;
 }
Example #6
0
 private UomStateDeleted NewUomStateDeleted(UomEventId stateEventId)
 {
     return(new UomStateDeleted(stateEventId));
 }
Example #7
0
 private UomStateMergePatched NewUomStateMergePatched(UomEventId stateEventId)
 {
     return(new UomStateMergePatched(stateEventId));
 }
Example #8
0
 public UomStateDeleted(UomEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 public UomStateMergePatched(UomEventId stateEventId) : base(stateEventId)
 {
 }
Example #10
0
 public UomStateCreated(UomEventId stateEventId) : base(stateEventId)
 {
 }
Example #11
0
 protected UomStateEventBase(UomEventId stateEventId) : base(stateEventId)
 {
 }