Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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)
                   );
        }
Exemplo n.º 5
0
 protected UomStateEventDtoBase(UomEventId stateEventId)
 {
     this.UomEventId = stateEventId;
 }
Exemplo n.º 6
0
 private UomStateDeleted NewUomStateDeleted(UomEventId stateEventId)
 {
     return(new UomStateDeleted(stateEventId));
 }
Exemplo n.º 7
0
 private UomStateMergePatched NewUomStateMergePatched(UomEventId stateEventId)
 {
     return(new UomStateMergePatched(stateEventId));
 }
Exemplo n.º 8
0
 public UomStateDeleted(UomEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 9
0
 public UomStateMergePatched(UomEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
 public UomStateCreated(UomEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 11
0
 protected UomStateEventBase(UomEventId stateEventId) : base(stateEventId)
 {
 }