Redigera

Dela via


SerializedMessagePayloadFeatureExtensions.GetSerializedPayload<T> Method

Definition

Gets the message payload as a serialized T type.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T GetSerializedPayload(System::Cloud::Messaging::MessageContext ^ context);
public static T GetSerializedPayload<T>(this System.Cloud.Messaging.MessageContext context);
static member GetSerializedPayload : System.Cloud.Messaging.MessageContext -> 'T
<Extension()>
Public Function GetSerializedPayload(Of T) (context As MessageContext) As T

Type Parameters

T

Type of the serialized message payload.

Parameters

context
MessageContext

The message context.

Returns

T

The serialized message payload.

Exceptions

context is null.

Remarks

Ensure the serialized message payload is set in the pipeline via SetSerializedPayload<T>(MessageContext, T) before calling this method.

Applies to