MessageContext.TryGetUTF8DestinationPayloadAsString(String) 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.
Try to get the DestinationPayload message registered with MessageContext as a String in the UTF8 encoding.
public:
bool TryGetUTF8DestinationPayloadAsString([Runtime::InteropServices::Out] System::String ^ % payload);
public bool TryGetUTF8DestinationPayloadAsString(out string? payload);
member this.TryGetUTF8DestinationPayloadAsString : string -> bool
Public Function TryGetUTF8DestinationPayloadAsString (ByRef payload As String) As Boolean
Parameters
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.