3rd party dll raising events
<p>I use a third party dll to get some data from their servers. There is a void method that I call and then i subscribe to an event raised by the call to this method. The event raised returns the data through its parameters.</p>

<p>so,
call to : void getdata(id)
raises:  void onReturn(object)  --> which returns an object that has the data.</p>

<p>This WORKS everytime when there is a single call to getdata(id)</p>

<p>The problem is when i loop through the list of ids, and inside that loop call getdata(id) for that list, the corresponding events are not raised properly.
Say for a list of 10 ids, there are 10 calls to getdata(id) but only few onReturns are raised.</p>

<p>The returned object also returns the id that was passed to getdata(id) so I can match the data i sent and the data that i receive.</p>

<p>Is there a way to make sure that all events get listened to? So if I send 10 ids by getdata(id), I want to make sure that the 10 onReturns are processed.  </p>

<p>And i'm using c#, .net 4.0</p>

<p>Thanks</p>
