コード例 #1
0
 private void SetupOutboundQueueSender(JsonObject settings)
 {
     // TODO: Use Options-Class
     _outboundQueue = new QueueSender(
         settings.GetNamedString("NamespaceName"),
         settings.GetNamedString("QueueName"),
         settings.GetNamedString("Authorization"));
 }
コード例 #2
0
        private void SendTestMessageToInboundQueue(object sender, RoutedEventArgs e)
        {
            var queueSender = new QueueSender(
                NamespaceTextBox.Text,
                InboundQueueNameTextBox.Text,
                InboundQueueSendSasTokenTextBox.Text);

            var systemProperties = new JObject
            {
                ["CorrelationId"] = Guid.NewGuid().ToString()
            };

            var body = new JObject
            {
                ["CallType"] = "Command",
                ["Uri"] = "/api/component/Office.CombinedCeilingLights/status"
            };

            var content = new JObject
            {
                ["action"] = "nextState"
            };

            body["Content"] = content;

            Task.Run(async () => await queueSender.SendAsync(systemProperties, body));
        }
コード例 #3
0
        private void SendTestMessageToOutboundQueue(object sender, RoutedEventArgs e)
        {
            var queueSender = new QueueSender(
                NamespaceTextBox.Text,
                OutboundQueueNameTextBox.Text,
                OutboundQueueSendSasTokenTextBox.Text);

               var properties = new JObject();
               var body = new JObject();

            Task.Run(async () => await queueSender.SendAsync(properties, body));
        }
 private void SetupOutboundQueueSender(JsonObject settings)
 {
     // TODO: Use Options-Class
     _outboundQueue = new QueueSender(
         settings.GetNamedString("NamespaceName"),
         settings.GetNamedString("QueueName"),
         settings.GetNamedString("Authorization"));
 }