C#, 3.5 – This is all back-end; there is no UI involved at all. I’m trying to call a function from another function asynchronously using BeginInvoke and EndInvoke. I need to call the method 4 times with different parameters and then, after all the calls are completed, I merge all the results and continue. It all works fine, except that the calls require the OperationContext for credentials and such. Is there an easy way to pass the OperationContext to the BeginInvoke statement somehow?
Share
The
BeginInvokestatement is based on the type of thedelegate. If you require theOperationContext, make it a parameter for the method, and you can then pass it into the function when callingBeginInvoke.