c# - Azure Notification Hub installation not updating tags -
i attempting update tags of installation within azure notification hub after registration. following several guides this, notably here , here.
both of these guides suggest following code should work plainly not; tag never gets updated. there no errors, , can guarantee installationid correct. guessing setting path/value of tag incorrectly.
// in constructor: var _notificationhub = notificationhubclient.createclientfromconnectionstring(settings.connectionstrings.notificationhub, settings.defaults.notificationhubname); // in webapi endpoint: var installationupdates = new list<partialupdateoperation>(); var userdetail = _userdetailrepo.get(id); installationupdates.add(new partialupdateoperation { operation = updateoperationtype.replace, path = "/tags/interestedin", // incorrect? value = interestedin.toupper() }); userdetail.interestedin = interestedin; await task.whenall( _userdetailrepo.insertorreplace(userdetail), _notificationhub.patchinstallationasync(installationid, installationupdates));
here installation object's tags, per vs:
i tried hardcoding path path = "/tags/interestedin:w"
made no difference.
can tell me if doing wrong here, , if how should amend code. thanks.
unfortunately, path = "/tags/interestedin" not going work of now. working on wildcards' support. once done, "/tags/interestedin*" work fine you.
while path = "/tags/interestedin:w" should ok. if provide namespace name, hub name, , timeframe, i'll take @ logs check going on there.
Comments
Post a Comment