Files
DocumentService/DocumentOperator.Infrastructure/Services/StringExtensions.cs
TekH 88bde13422 refactor: Refactor DevExpressSwissQrCodeProcessor to use Codecrete QRBill parser
- Change return type to tuple (Bill, string[])
- Remove custom parsing methods (ParseSwissQrBillContent, MapAddress, DetermineReferenceType)
- Use Codecrete QRBill.DecodeQrCodeText() for parsing
- Add SkiaSharp.QrCode v1.0.0 for QR decoding
- Remove obsolete ZXing and System.Drawing dependencies
- Add StringExtensions for QR code detection
- Raw lines properly split and trimmed from QR text
2026-07-16 15:47:33 +02:00

16 lines
438 B
C#

using System.Xml.Serialization;
namespace DocumentOperator.Infrastructure.Services;
public static class StringExtensions
{
public static T? DeserializeXml<T>(this string xmlText)
{
if (string.IsNullOrWhiteSpace(xmlText))
return default;
var serializer = new XmlSerializer(typeof(T));
using var reader = new StringReader(xmlText);
return (T?)serializer.Deserialize(reader);
}
}