示例#1
0
        internal static DirectoryQueueMessage BuildMessage(IActorMessage msg)
        {
            DirectoryQueueMessage cloudMessage = new DirectoryQueueMessage();

            byte[] msgBytes = TempSerialization.GetBytes <MsgType>(msg);
            cloudMessage.SetMessageContent(msgBytes);
            return(cloudMessage);
        }
示例#2
0
        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));
            }
        }