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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET