Interface(s) inheriting other interface(s) in WCF services.

Posted by avance70 on Stack Overflow See other posts from Stack Overflow or by avance70
Published on 2010-06-01T11:09:26Z Indexed on 2010/06/01 11:13 UTC
Read the original article Hit count: 279

Filed under:
|
|
|
|

In my solution there's a few WCF services, each of them implementing it's own callback interface. Let's say they are called: Subscribe1, with ISubscribe1 and ICallback1, etc.

It happens there are a few methods shared among ICallbacks, so I made a following interface:

interface ICallback
{
    [OperationContract]
    CommonlyUsedMethod();
}

and i inherited it in all: ICallback1 : ICallback, ICallback2 : ICallback, etc. And deleted the CommonlyUsedMethod() from all callback interfaces.

Now, on the service-side code, everything compiles fine and services can start working as usual. But, when I updated the service references for the client, CommonlyUsedMethod() dissapeared from the reference.cs file (the ISubscribeCallback part), and could no longer be used to send data to back to the client.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wcf