B
Brian Tkatch
Guest
I am using a web proxy (Titanium Proxy) as part of a program. It handles 4 different events (before/after request/response). All the handlers are defined as Async, so the signature i am using for before request is:
Async Function Before_Request(Sender As Object, Arguments As SessionEventArgs) As Task Handles Proxy_Server.BeforeResponse
In my case, however, nothing is being awaited for. The event is simply being used to store the current state so Before Response (which indeed uses Await) can get at the correct version of the data. The UI green-lines the function name, telling me that the async method lacks Await operators. If i remove Async from the declaration, it green-lines End Function, telling me that it doesn't return a value on all code paths.
I assume i should leave the Async in there and ignore the green line warning. Does that sound right?
Continue reading...
Async Function Before_Request(Sender As Object, Arguments As SessionEventArgs) As Task Handles Proxy_Server.BeforeResponse
In my case, however, nothing is being awaited for. The event is simply being used to store the current state so Before Response (which indeed uses Await) can get at the correct version of the data. The UI green-lines the function name, telling me that the async method lacks Await operators. If i remove Async from the declaration, it green-lines End Function, telling me that it doesn't return a value on all code paths.
I assume i should leave the Async in there and ignore the green line warning. Does that sound right?
Continue reading...