Inheritance of contracts in WCF

Viewed 6780

I have several WCF services in a test harness that have some similar functionality, like start/stop/clean parts of distributed system under test. I cannot use a universal contract to do that - each part of the distributed system has different steps for those operations.

I was thinking to define a base interface and derive the current WCF interfaces from them.

For Example:

interface Base
{
    void BaseFoo();
    void BaseBar();
    ...
}

interface Child1:Base
{
    void ChildOperation1();
    ...
}

interface Child2:Base
{
    void ChildOperation2();
    ...
}

What I have right now is those start/stop/clean operations defined in each child interface.

Q Shall I extract similar functionality into the base interface or are there any other solutions? Will I have any problems with the inheritance of contracts in WCF?

1 Answers
Related