a guest Dec 14th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- var message = new BrokeredMessage(objMess.MessageBody);
- var reader = new StreamReader(receivedMessage.GetBody<Stream>());
- @string3http://schemas.microsoft.com/2003/10/Serialization/� .
- Rest of Message Body
- private BrokeredMessage GetBrokeredMessageWithBody(object body)
- var json = JsonConvert.SerializeObject(body);
- return new BrokeredMessage(GenerateStreamFromString(json));
- private Stream GenerateStreamFromString(string s)
- var stream = new MemoryStream();
- var writer = new StreamWriter(stream);
- stream.Position = 0;
- return stream;
RAW Paste Data