Get value passed in async calls
I'd like to gather what was sent to a webservice in my Eventhandler, is this possible?
Say I make an asychronous call here:
proxyLocation.GetLocationZonesBySupplierZoneCodeCompleted +开发者_如何学C= new EventHandler<GetLocationZonesBySupplierZoneCodeCompletedEventArgs>(proxy_GetLocationZonesBySupplierZoneCodeCompleted);
proxyLocation.GetLocationZonesBySupplierZoneCodeAsync(txtZoneNumber.Text);
And within my proxy_GetLocationZonesBySupplierZoneCodeCompleted method, I'd like to know what was sent over. IE(txtZoneNumber.Text)
I can't count on txtZoneNumber.Text being the same when the response comes back as when it was sent. Any way to accomplish this?
The event only shows you the result of the method. If you need the data that was passed you'll have to make it part of what is returned by the async method.
精彩评论