Пример #1
0
        protected virtual IPicklistBinStateMergePatched Map(IMergePatchPicklistBin c)
        {
            var stateEventId = new PicklistBinEventId(c.PicklistBinId, c.Version);
            IPicklistBinStateMergePatched e = NewPicklistBinStateMergePatched(stateEventId);

            e.PicklistId            = c.PicklistId;
            e.BinLocationNumber     = c.BinLocationNumber;
            e.PrimaryOrderId        = c.PrimaryOrderId;
            e.PrimaryShipGroupSeqId = c.PrimaryShipGroupSeqId;
            e.Active = c.Active;
            e.IsPropertyPicklistIdRemoved            = c.IsPropertyPicklistIdRemoved;
            e.IsPropertyBinLocationNumberRemoved     = c.IsPropertyBinLocationNumberRemoved;
            e.IsPropertyPrimaryOrderIdRemoved        = c.IsPropertyPrimaryOrderIdRemoved;
            e.IsPropertyPrimaryShipGroupSeqIdRemoved = c.IsPropertyPrimaryShipGroupSeqIdRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


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

            var version = c.Version;

            foreach (IPicklistItemCommand innerCommand in c.PicklistItemCommands)
            {
                ThrowOnInconsistentCommands(c, innerCommand);

                IPicklistItemEvent innerEvent = Map(innerCommand, c, version, _state);
                e.AddPicklistItemEvent(innerEvent);
            }


            return(e);
        }
 void IPicklistBinApplicationService.When(IMergePatchPicklistBin c)
 {
     this.When((MergePatchPicklistBinDto)c);
 }
Пример #3
0
 public virtual void When(IMergePatchPicklistBin c)
 {
     Update(c, ar => ar.MergePatch(c));
 }
Пример #4
0
        public virtual void MergePatch(IMergePatchPicklistBin c)
        {
            IPicklistBinStateMergePatched e = Map(c);

            Apply(e);
        }