Skip to content

Instantly share code, notes, and snippets.

#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)
using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;
using Newtonsoft.Json;
namespace ServiceBusTopicsCLI
{
class Program
static async Task ModifySubscriptionWithInStockFilter() {
var subscriptionClient = new SubscriptionClient(
SERVICEBUSCONNSTRING,
TOPICNAME,
SUBNAME,
ReceiveMode.ReceiveAndDelete);
await subscriptionClient.AddRuleAsync(new RuleDescription
{
Filter = new SqlFilter("IsInStock = true"),
<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...