Exemplo n.º 1
0
        /// <summary>
        /// SEnds a message to Service Bus topic.
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="args">topicPath, subscriptionName.</param>
        public void Send(Message msg, Dictionary <string, object> args = null)
        {
            string TopicName = args["TopicName"].ToString();
            string ConnStr   = args["ConnStr"].ToString();

            TopicClient client = TopicClient.CreateFromConnectionString(ConnStr, TopicName);

            client.Send(MsgConvertor.FromMessage(msg));
        }
Exemplo n.º 2
0
        public void Send(Message msg, Dictionary <string, object> args = null)
        {
            string m_QueueName = args["QueueName"].ToString();
            string m_ConnStr   = args["ConnStr"].ToString();

            QueueClient client = QueueClient.CreateFromConnectionString(m_ConnStr, m_QueueName);

            client.Send(MsgConvertor.FromMessage(msg));
        }