When I use SvcUtil.exe to generate a proxy of my service, I get a class derived from ClientBase even though I declare a CallbackContract. This is the service contract:
[ServiceContract(CallbackContract = typeof(IMechClient))]
interface IMechService
{
[OperationContract(IsOneWay = true)]
void Increment();
[OperationContract]
bool RegisterPlayer();
}
And this is the generated proxy header:
public partial class MechServiceClient : System.ServiceModel.ClientBase<IMechService>, IMechService
Obviously I could manually edit the proxy, but as this project is still in the works, I'll have to regenerate the proxy numerous times and would rather learn the correct way now rather than keep manually tweaking the proxy file every time I recompile.
By attempting to create the proxy using DuplexChannelFactory instead, I received a different error and figured out you need to implement an OperationContract in the Callback interface first or else the CallbackContract is ignored, thus not deriving from DuplexClientBase.