public bool DeepEquals(VendorItem other) { return(other != null && VendorItemIndex == other.VendorItemIndex && Item.DeepEquals(other.Item) && Quantity == other.Quantity && FailureIndexes.DeepEqualsReadOnlySimpleCollection(other.FailureIndexes) && Currencies.DeepEqualsReadOnlyCollections(other.Currencies) && RefundPolicy == other.RefundPolicy && RefundTimeLimit == other.RefundTimeLimit && CreationLevels.DeepEqualsReadOnlyCollections(other.CreationLevels) && DisplayCategoryIndex == other.DisplayCategoryIndex && CategoryIndex == other.CategoryIndex && OriginalCategoryIndex == other.OriginalCategoryIndex && MinimumLevel == other.MinimumLevel && MaximumLevel == other.MaximumLevel && Action.DeepEquals(other.Action) && DisplayCategory == other.DisplayCategory && InventoryBucket.DeepEquals(other.InventoryBucket) && VisibilityScope == other.VisibilityScope && PurchasableScope == other.PurchasableScope && Exclusivity == other.Exclusivity && IsOffer == other.IsOffer && IsCRM == other.IsCRM && SortValue == other.SortValue && ExpirationTooltip == other.ExpirationTooltip && RedirectToSaleIndexes.DeepEqualsReadOnlySimpleCollection(other.RedirectToSaleIndexes) && SocketOverrides.DeepEqualsReadOnlyCollections(other.SocketOverrides) && IsUnpurchasable == other.IsUnpurchasable && LicenseUnlockHash == other.LicenseUnlockHash && PriceOverrideEnabled == other.PriceOverrideEnabled && RewardAdjustorPointer.DeepEquals(other.RewardAdjustorPointer) && SeedOverride == other.SeedOverride && Weight == other.Weight); }
public void Handle(CheckItemOut message) { // Load object from history var obj = new InventoryBucket(history); // Call CheckItemOut obj.CheckItemOut(message.Quantity); var producedEvents = obj.GetProducedEvents(); if (producedEvents.Count > 0) { history.AddRange(producedEvents); foreach (var e in producedEvents) { Console.WriteLine("Produced: " + e); } } }
public static void Main() { var checkItemOutPipeline = new LoggingHndler <CheckItemOut>( new CheckItemOUtHandler()); checkItemOutPipeline.Handle(new CheckItemOut(10)); //or var bucket = new InventoryBucket(); bucket.CheckItemIn(100); bucket.CheckItemOut(10); bucket.CheckItemOut(10); bucket.CheckItemIn(100); var history = bucket.GetProducedEvents(); //save in the database var item = new InventoryBucket(history); Console.WriteLine(item); }