public bool AddMyItem(int appId, long contextId, long assetId, long amount = 1) { var asset = new TradeStatusUser.TradeAsset(); asset.CreateItemAsset(appId, contextId, assetId, amount); return(ShouldUpdate(MyOfferedItems.AddItem(asset))); }
public bool RemoveMyCurrencyItem(int appId, long contextId, long currencyId, long amount) { var asset = new TradeStatusUser.TradeAsset(); asset.CreateCurrencyAsset(appId, contextId, currencyId, amount); return(ShouldUpdate(MyOfferedItems.RemoveCurrencyItem(asset))); }
private void ValidateLocalTradeItems() { if (!myOfferedItemsLocalCopy.Values.OrderBy(o => o).SequenceEqual(MyOfferedItems.OrderBy(o => o))) { throw new TradeException("Error validating local copy of offered items in the trade"); } }
private void ValidateLocalTradeItems() { if (steamMyOfferedItems.Count != MyOfferedItems.Count) { throw new TradeException("Error validating local copy of items in the trade: Count mismatch"); } if (steamMyOfferedItems.Values.Any(id => !MyOfferedItems.Contains(id))) { throw new TradeException("Error validating local copy of items in the trade: Item was not in the Steam Copy."); } }