public override IValue Serialize() { var innerDictionary = ((Dictionary)base.Serialize()) .SetItem(SellerAgentAddressKey, SellerAgentAddress.Serialize()) .SetItem(SellerAvatarAddressKey, SellerAvatarAddress.Serialize()) .SetItem(PriceKey, Price.Serialize()) .SetItem(OrderTypeKey, Type.Serialize()) .SetItem(ItemSubTypeKey, ItemSubType.Serialize()); return(new Dictionary(innerDictionary)); }
public IValue Serialize() { var dictionary = new Dictionary <IKey, IValue> { [(Text)OrderIdKey] = OrderId.Serialize(), [(Text)SellerAvatarAddressKey] = SellerAvatarAddress.Serialize(), [(Text)SellerAgentAddressKey] = SellerAgentAddress.Serialize(), [(Text)ItemSubTypeKey] = ItemSubType.Serialize(), [(Text)PriceKey] = Price.Serialize(), [(Text)TradableIdKey] = TradableId.Serialize(), }; return(new Bencodex.Types.Dictionary(dictionary)); }