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
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.