Example #1
0
        protected virtual ISellableInventoryItemEntryMvoStateMergePatched Map(IMergePatchSellableInventoryItemEntryMvo c)
        {
            var stateEventId = new SellableInventoryItemEntryMvoEventId(c.SellableInventoryItemEntryId, c.SellableInventoryItemVersion);
            ISellableInventoryItemEntryMvoStateMergePatched e = NewSellableInventoryItemEntryMvoStateMergePatched(stateEventId);

            e.SellableQuantity = c.SellableQuantity;
            e.SourceEventId    = c.SourceEventId;
            e.Version          = c.Version;
            e.SellableInventoryItemSellableQuantity = c.SellableInventoryItemSellableQuantity;
            e.SellableInventoryItemCreatedBy        = c.SellableInventoryItemCreatedBy;
            e.SellableInventoryItemCreatedAt        = c.SellableInventoryItemCreatedAt;
            e.SellableInventoryItemUpdatedBy        = c.SellableInventoryItemUpdatedBy;
            e.SellableInventoryItemUpdatedAt        = c.SellableInventoryItemUpdatedAt;
            e.IsPropertySellableQuantityRemoved     = c.IsPropertySellableQuantityRemoved;
            e.IsPropertySourceEventIdRemoved        = c.IsPropertySourceEventIdRemoved;
            e.IsPropertyVersionRemoved = c.IsPropertyVersionRemoved;
            e.IsPropertySellableInventoryItemSellableQuantityRemoved = c.IsPropertySellableInventoryItemSellableQuantityRemoved;
            e.IsPropertySellableInventoryItemCreatedByRemoved        = c.IsPropertySellableInventoryItemCreatedByRemoved;
            e.IsPropertySellableInventoryItemCreatedAtRemoved        = c.IsPropertySellableInventoryItemCreatedAtRemoved;
            e.IsPropertySellableInventoryItemUpdatedByRemoved        = c.IsPropertySellableInventoryItemUpdatedByRemoved;
            e.IsPropertySellableInventoryItemUpdatedAtRemoved        = c.IsPropertySellableInventoryItemUpdatedAtRemoved;

            e.CommandId = c.CommandId;


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

            var sellableInventoryItemVersion = c.SellableInventoryItemVersion;


            return(e);
        }
Example #2
0
        protected SellableInventoryItemEntryMvoStateMergePatched NewSellableInventoryItemEntryMvoStateMergePatched(long version, string commandId, string requesterId)
        {
            var stateEventId = new SellableInventoryItemEntryMvoEventId(_state.SellableInventoryItemEntryId, version);
            var e            = NewSellableInventoryItemEntryMvoStateMergePatched(stateEventId);

            e.CommandId = commandId;

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

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

            SellableInventoryItemEntryMvoEventId other = obj as SellableInventoryItemEntryMvoEventId;

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

            return(true &&
                   Object.Equals(this.SellableInventoryItemEntryId, other.SellableInventoryItemEntryId) &&
                   Object.Equals(this.SellableInventoryItemVersion, other.SellableInventoryItemVersion)
                   );
        }
 protected SellableInventoryItemEntryMvoEventBase(SellableInventoryItemEntryMvoEventId stateEventId)
 {
     this.SellableInventoryItemEntryMvoEventId = stateEventId;
 }
 public SellableInventoryItemEntryMvoStateMergePatched(SellableInventoryItemEntryMvoEventId stateEventId) : base(stateEventId)
 {
 }
 public SellableInventoryItemEntryMvoStateCreated(SellableInventoryItemEntryMvoEventId stateEventId) : base(stateEventId)
 {
 }
 protected SellableInventoryItemEntryMvoStateEventBase(SellableInventoryItemEntryMvoEventId stateEventId) : base(stateEventId)
 {
 }
Example #8
0
 private SellableInventoryItemEntryMvoStateMergePatched NewSellableInventoryItemEntryMvoStateMergePatched(SellableInventoryItemEntryMvoEventId stateEventId)
 {
     return(new SellableInventoryItemEntryMvoStateMergePatched(stateEventId));
 }