internal static DirectoryQueueMessage BuildMessage(IActorMessage msg) { DirectoryQueueMessage cloudMessage = new DirectoryQueueMessage(); byte[] msgBytes = TempSerialization.GetBytes <MsgType>(msg); cloudMessage.SetMessageContent(msgBytes); return(cloudMessage); }
internal static void SerializeAndSend(IActorMessage msg, DirectoryQueue queue, string msgString) { DirectoryQueueMessage cloudMessage = new DirectoryQueueMessage(); cloudMessage.SetMessageContent(msgString); AddMessageProperties(queue, cloudMessage, (msg is IStorageQueuePropertiesProvider) ? (msg as IStorageQueuePropertiesProvider) : null); if (null != msg.Status) { msg.Status?.SetResult(new QueuedDirectoryMessage(cloudMessage)); } }