This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#load "productstockchanged.csx" | |
using System; | |
using System.Threading.Tasks; | |
using System.Runtime.Serialization.Json; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
public static void Run(string mySbMsg, TraceWriter log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.ServiceBus; | |
using Newtonsoft.Json; | |
namespace ServiceBusTopicsCLI | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static async Task ModifySubscriptionWithInStockFilter() { | |
var subscriptionClient = new SubscriptionClient( | |
SERVICEBUSCONNSTRING, | |
TOPICNAME, | |
SUBNAME, | |
ReceiveMode.ReceiveAndDelete); | |
await subscriptionClient.AddRuleAsync(new RuleDescription | |
{ | |
Filter = new SqlFilter("IsInStock = true"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1>Products</h1> | |
<ul> | |
<li>Product 123 <input id="chkNotifyInStock123" type="checkbox" onclick="toggleNotifyTag(this, '123');">Notify</input></li> | |
<li>Product 456 <input id="chkNotifyInStock456" type="checkbox" onclick="toggleNotifyTag(this, '456');">Notify</input></li> | |
<li>Product 789 <input id="chkNotifyInStock789" type="checkbox" onclick="toggleNotifyTag(this, '789');">Notify</input></li> | |
</ul> | |
<script type="text/javascript"> | |
...Urban Airship snippet goes here... |