Async Search and Query on contentDirectory
|
27-01-2013, 03:11 PM
Post: #1
|
|||
|
|||
Async Search and Query on contentDirectory
Hi,
Is there any chance, if i use async search or browse on contentDirectory, to pass some information to the "sink" Method? I get some IntPtr that is used to get the correct data, but i do not know from which context it was called. eg. contentDirectory.Browse(..., BrowseSink); contentDirectory.Browse(..., BrowseSink); protected void BrowseSink(IntPtr _ptr) { // do i come from first Browse or second browse? } best regards Chris |
|||
28-01-2013, 01:34 PM
Post: #2
|
|||
|
|||
RE: Async Search and Query on contentDirectory
You can use a lambda to add some call-specific data:
contentDirectory.Browse(..., (asyncHandle) => BrowseSink(asyncHandle, 1)); contentDirectory.Browse(..., (asyncHandle) => BrowseSink(asyncHandle, 2)); private void BrowseSink(IntPtr aAsyncHandle, int aOther) { } I'm sure you can pass something more interesting that a counter as an extra argument. aOther above is just a simple example of the sort of thing you could do. |
|||
28-01-2013, 07:09 PM
Post: #3
|
|||
|
|||
RE: Async Search and Query on contentDirectory
Thank you very much!
Work's like a charm! |
|||
« Next Oldest | Next Newest »
|