A .NET 8 wrapper using RestSharp for the Paywire.com API
This library uses XmlSerializer
for XML serialization/deserialization. By default, serialization assemblies are generated at runtime on first use, which causes a minor performance penalty (<100ms) during the first API call for each request/response type.
For better startup performance, you can pre-generate the XML serializers using the included script:
# After building your project
./generate-serializers.sh
This script works around a known issue with Microsoft.XmlSerializer.Generator
that occurs when multiple .NET runtime versions are installed.
If you prefer not to use the script, you can warm up the serializers during application initialization:
// Warm up common serializers
_ = new XmlSerializer(typeof(SaleRequest));
_ = new XmlSerializer(typeof(SaleResponse));
// Add other types you frequently use