public override IValue Serialize() => new Bencodex.Types.Dictionary(new Dictionary <IKey, IValue> { [(Text)"shopItem"] = shopItem.Serialize(), [(Text)"id"] = id.Serialize(), [(Text)"gold"] = gold.Serialize(), }.Union((Bencodex.Types.Dictionary)base.Serialize()));
public IValue Serialize() => new Dictionary(new Dictionary <IKey, IValue> { [(Text)"sellerAgentAddress"] = SellerAgentAddress.Serialize(), [(Text)"sellerAvatarAddress"] = SellerAvatarAddress.Serialize(), [(Text)"productId"] = ProductId.Serialize(), [(Text)"itemUsable"] = ItemUsable.Serialize(), [(Text)"price"] = Price.Serialize(), });
public override IValue Serialize() { var innerDict = ((Dictionary)base.Serialize()) .SetItem(SellerAgentAddressKey, SellerAgentAddress.Serialize()) .SetItem(PriceKey, Price.Serialize()) .SetItem(CombatPointKey, CombatPoint.Serialize()) .SetItem(LevelKey, Level.Serialize()) .SetItem(ItemIdKey, ItemId.Serialize()) .SetItem(ItemCountKey, ItemCount.Serialize()); return(new Dictionary(innerDict)); }
public IValue Serialize() { var innerDictionary = new Dictionary <IKey, IValue> { [(Text)"sellerAgentAddress"] = SellerAgentAddress.Serialize(), [(Text)"sellerAvatarAddress"] = SellerAvatarAddress.Serialize(), [(Text)"productId"] = ProductId.Serialize(), [(Text)"price"] = Price.Serialize(), }; if (ItemUsable != null) { innerDictionary.Add((Text)"itemUsable", ItemUsable.Serialize()); } if (Costume != null) { innerDictionary.Add((Text)"costume", Costume.Serialize()); } return(new Dictionary(innerDictionary)); }