public virtual IValue Serialize() => Dictionary.Empty .Add("id", Id.Serialize()) .Add("item_type", ItemType.Serialize()) .Add("item_sub_type", ItemSubType.Serialize()) .Add("grade", Grade.Serialize()) .Add("elemental_type", ElementalType.Serialize());
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)); }