Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mbellinaso/a8e59ae577ac79391b673778edce7cb2 to your computer and use it in GitHub Desktop.
Save mbellinaso/a8e59ae577ac79391b673778edce7cb2 to your computer and use it in GitHub Desktop.
static async Task ModifySubscriptionWithInStockFilter() {
var subscriptionClient = new SubscriptionClient(
SERVICEBUSCONNSTRING,
TOPICNAME,
SUBNAME,
ReceiveMode.ReceiveAndDelete);
await subscriptionClient.AddRuleAsync(new RuleDescription
{
Filter = new SqlFilter("IsInStock = true"),
Name = "OnlyBackInStock"
});
Console.WriteLine("Subscription modified with new filter");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment