SseItemParser<T> Delegate

Definition

Encapsulates a method for parsing the bytes payload of a server-sent event.

public delegate T SseItemParser<out T>(string eventType, ReadOnlySpan<byte> data);

Type Parameters

T

Specifies the type of the return value of the parser.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

Parameters

eventType
String

The event's type.

data
ReadOnlySpan<Byte>

The event's payload bytes.

Return Value

T

The parsed T.

Applies to

Produk Versi
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)