Interface IInvoiceSerializer

Namespace
EInvoice.Core.Abstractions
Assembly
EInvoice.Core.dll

Serializes an Invoice domain model to a specific XML format.

public interface IInvoiceSerializer

Properties

SyntaxBinding

The syntax binding this serializer produces (e.g. "UBL", "CII").

string SyntaxBinding { get; }

Property Value

string

Methods

Serialize(Invoice)

Serialize an invoice to XML string.

string Serialize(Invoice invoice)

Parameters

invoice Invoice

Returns

string

Serialize(Invoice, Stream)

Serialize an invoice to a stream.

void Serialize(Invoice invoice, Stream output)

Parameters

invoice Invoice
output Stream

SerializeAsync(Invoice, Stream, CancellationToken)

Serialize an invoice to a stream asynchronously with cancellation support.

Task SerializeAsync(Invoice invoice, Stream output, CancellationToken cancellationToken = default)

Parameters

invoice Invoice
output Stream
cancellationToken CancellationToken

Returns

Task