Edit

Share via


MessageDestinationPayloadFeatureExtensions.TryGetDestinationPayloadAsUTF8String Method

Definition

Gets the message payload for IMessageDestination as String in UTF8.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryGetDestinationPayloadAsUTF8String(System::Cloud::Messaging::MessageContext ^ context, [Runtime::InteropServices::Out] System::String ^ % utf8StringPayload);
public static bool TryGetDestinationPayloadAsUTF8String(this System.Cloud.Messaging.MessageContext context, out string utf8StringPayload);
static member TryGetDestinationPayloadAsUTF8String : System.Cloud.Messaging.MessageContext * string -> bool
<Extension()>
Public Function TryGetDestinationPayloadAsUTF8String (context As MessageContext, ByRef utf8StringPayload As String) As Boolean

Parameters

utf8StringPayload
String

The out to store the resultant payload as UTF8String.

Returns

Message payload as String.

Remarks

Implementation copied from public override unsafe string ToString() method of BinaryData. No special treatment is given to the contents of the data, it is merely decoded as a UTF-8 string. For a JPEG or other binary file format the string will largely be nonsense with many embedded NUL characters, and UTF-8 JSON values will look like their file/network representation, including starting and stopping quotes on a string.

Applies to