SerializedMessagePayloadFeatureExtensions.GetSerializedPayload<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.
No ISerializedMessagePayloadFeature<T> is set in the context
.
Remarks
Ensure the serialized message payload is set in the pipeline via SetSerializedPayload<T>(MessageContext, T) before calling this method.
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.