Redigera

Dela via


SerializedMessagePayloadFeatureExtensions.TryGetSerializedPayload<T> Method

Definition

Try to get the serialized message payload of T type from the MessageContext.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool TryGetSerializedPayload(System::Cloud::Messaging::MessageContext ^ context, [Runtime::InteropServices::Out] T % payload);
public static bool TryGetSerializedPayload<T>(this System.Cloud.Messaging.MessageContext context, out T? payload);
static member TryGetSerializedPayload : System.Cloud.Messaging.MessageContext * 'T -> bool
<Extension()>
Public Function TryGetSerializedPayload(Of T) (context As MessageContext, ByRef payload As T) As Boolean

Type Parameters

T

Type of the serialized message.

Parameters

context
MessageContext

The message context.

payload
T

The optional serialized message payload.

Returns

Boolean and if true, a corresponding T representing the serialized message payload.

Exceptions

Any argument is null.

Applies to