I have a nettcp WCF service that supports single callback method.
I want to add new callback methods by adding new interface that contains the new methods without breaking the old one as there is another things depend on the old interface.
I tried to add new interface that inherits from the old one but the gerenated proxy in the the client application does not contain the old callback interface.
the code is as follows
interface IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod1(int x);
}
interface INewCallback : IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod2(float x);
[OperationContract(IsOneWay = true)]
void OnMethod3(bool x);
}
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(INewCallback))]
public interface IMyService
{
}
P.S
I make quick and dirty solution so I'll not break the old client codes
interface INewCallback : IOldCallback
{
[OperationContract(IsOneWay = true)]
void OnMethod2(float x);
[OperationContract(IsOneWay = true)]
void OnMethod3(bool x);
[OperationContract(IsOneWay = true)]
new void OnMethod1(int x);
}