コード例 #1
0
 private static InventoryItemStockView Map(InventoryItemCreated e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive ?? true,
         Sku = e.Id,
         Count = v.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
コード例 #2
0
 private static InventoryItemStockView Map(InventoryItemDeactivated e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = false,
         Sku = v.Sku,
         Count = v.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
コード例 #3
0
 private static InventoryItemStockView Map(ItemsCheckedInToInventory e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count + e.Count,
         OverStockLimit = v.OverStockLimit
     });
 }
コード例 #4
0
 private static InventoryItemStockView Map(InventoryItemStockLimitChanged e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count,
         OverStockLimit = e.Limit
     });
 }
コード例 #5
0
 private static InventoryItemStockView Map(ItemsRemovedFromInventory e, InventoryItemStockView v)
 {
     return(new InventoryItemStockView
     {
         IsActive = v.IsActive,
         Sku = v.Sku,
         Count = v.Count - e.Count,
         OverStockLimit = v.OverStockLimit
     });
 }