Hi,
I'm currently working on implement live subscriptions in an AdHoc Data Source script. I need live updates on 4 different sites: 1 DOM Instance, 2 elements and 1 service. I implemented a code using multiple watchers per site but one of the element subscriptions is the only that is working. This is the OnStartUpdate code:
And this is the _OnChange method (both ParameterWatcher variables have the same code):
Is there another way I could implement to have that multiple subscriptions? Do I must use one watcher?
Hi German,
Code seems fine as Tom mentioned but I would recommend putting together all watchers of the same type, for example in your case, you would only need one "ParameterWatcher" instead of 2, you can add as many elements as you need having a list of SubscriptionFilterParameter where you can add both of your filters and consolidate them in a single ParameterWatcher.
something like this