.NET Framework 3.5. On the server side I have an interface
public interface IClientCallback
{
[OperationContract(IsOneWay = true)]
void ReceiveBroadcast(string nickname, string message);
[OperationContract(IsOneWay = true)]
void ReceivePrivate(string nickname, string message);
[OperationContract(IsOneWay = true)]
void UserJoined(string nickname);
[OperationContract(IsOneWay = true)]
void UserLeft(string nickname);
}
with svcutil I've got the folliwing interface generated
public interface IServerCallback
{
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServer/ReceiveBroadcast")]
void ReceiveBroadcast(string nickname, string message);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://tempuri.org/IServer/ReceiveBroadcast")]
System.IAsyncResult BeginReceiveBroadcast(string nickname, string message, System.AsyncCallback callback, object asyncState);
void EndReceiveBroadcast(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServer/ReceivePrivate")]
void ReceivePrivate(string nickname, string message);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://tempuri.org/IServer/ReceivePrivate")]
System.IAsyncResult BeginReceivePrivate(string nickname, string message, System.AsyncCallback callback, object asyncState);
void EndReceivePrivate(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServer/UserJoined")]
void UserJoined(string nickname);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://tempuri.org/IServer/UserJoined")]
System.IAsyncResult BeginUserJoined(string nickname, System.AsyncCallback callback, object asyncState);
void EndUserJoined(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://tempuri.org/IServer/UserLeft")]
void UserLeft(string nickname);
[System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://tempuri.org/IServer/UserLeft")]
System.IAsyncResult BeginUserLeft(string nickname, System.AsyncCallback callback, object asyncState);
void EndUserLeft(System.IAsyncResult result);
}
As you see it provides End* and Begin* methods though all the operations are one way. What could be the cause? I tried adding AsyncPattern = false to IClientCallback methods, but without result.