I have a service WCF interface:
[ServiceContract(Namespace = "net.pipe://QFX_DLL/TradingService")]
public interface IGenericTradingInterface {
[OperationContract]
void GetServerInformation(out ServerAttributes attributes);
}
The host for this is up and running correct. I create the client proxy object with svcutil as follows:
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config net.pipe://localhost/QFX_DLL/mex /async /tcv:Version35
The generated proxy for the async call looks like this:
public void GetServerInformationAsync()
{
this.GetServerInformationAsync(null);
}
As you see, the out parameter attributes is completely missing! The non-async methods look fine.
With this declaration of GetServerInformationAsync I can’t get the result back.
What’s going on here?
The out parameter (and any results) will be in the EventArgs class which is passed to the event which is fired when GetServerInformation completes (likely GetServerInformationCompleted). The property name will be either Result (which is likely the case in an operation returning only 1 value) or the parameter name (attributes).