Beispiel #1
0
 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());
Beispiel #2
0
        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));
        }