RestSharp でこの Xml スニペットを 2 つのクラスではなく、1 つのクラスに逆シリアル化することは可能ですか?
<shippingInfo>
<shippingServiceCost currencyId="AUD">58.02</shippingServiceCost>
<shippingType>Flat</shippingType>
<shipToLocations>Worldwide</shipToLocations>
</shippingInfo>
最初の要素に注目してくださいshippingServiceCost。そこに属性があります。通常は、 という子クラスを作成しShippingServiceCost、そこに と の 2 つのプロパティを追加CurrentIdしValueます。
しかし、メイン クラスのプロパティに CurrencyId 値を含めることは可能ShippingInfoですか?