A little difficult to describe, but I try:
Assume my app creates an array of 1000 strings and call a method on a 3'rd
party assembly with this array as argument (this sets up a subscription of
data from another system).
This method results in callbacks later which my app handles.
In the callback, one argument is an array of subscribed data, but only the
data which are changed since previous callback.
When the "subscription" was set up, a unique index was associated with each
item, the data in the callback contains this associated index (a kind of
handle) for each item in the array of data.
When the "subscription" was setup, I also create an object associated with
each subscribed item (via the "handle")
How to best setup the event/delegates to inform the associated objects when
changed data is received via the callback from 3'rd party assembly ?
(the size of the data array from 3'rd party assembly will, in general,
change each time)
|