Hello!
I am using the BingSearchProvider to get geodata for addresses. Simply by creating a SearchRequest an calling the SearchAsync method. What I need is some data of the request in the method linked to the SearchCompleted event.
My first attempt was writing a custom SearchRequest class with the needed data fields, inherited from the SearchRequest class. The request works fine but i didn't find any data of the request object when code runs into the attached method.
The second attempt was creating a new SearchProvider instance for every request and passing the needed parameters to the SearchCompleted method by binding the handler with an delegate, which lead to massive performance problems (as I thought).
Is there any possibilty to get the SearchRequest in SearchCompletedEventArgs in the event handler method? Or perhaps, someone of you could figure out a clean pattern for such a scenario.
I will greatly appreciate any bit of information about this topic. Thank you!
Jonas
I am using the BingSearchProvider to get geodata for addresses. Simply by creating a SearchRequest an calling the SearchAsync method. What I need is some data of the request in the method linked to the SearchCompleted event.
My first attempt was writing a custom SearchRequest class with the needed data fields, inherited from the SearchRequest class. The request works fine but i didn't find any data of the request object when code runs into the attached method.
The second attempt was creating a new SearchProvider instance for every request and passing the needed parameters to the SearchCompleted method by binding the handler with an delegate, which lead to massive performance problems (as I thought).
Is there any possibilty to get the SearchRequest in SearchCompletedEventArgs in the event handler method? Or perhaps, someone of you could figure out a clean pattern for such a scenario.
I will greatly appreciate any bit of information about this topic. Thank you!
Jonas