Can we two WCF services where one service contract derives from another and have an extension method inside the derived contract. what will be the result of accessing this contract from the WCF Client. I.e. what will happen if IDServiceis accessed
E.g.
[ServiceContract]
public interface IBaseService
{
public void A();
...
}
[ServiceContract]
public interface IDService: IBaseService
{
public static void B(this IBaseService S);
....
}
A good question – got me to a lot of head scratching.
Extension method is meaningless to WCF – and WSDL for that matter.
If you use
Service Referenceto generated the client, you would not see the extension method (since WSDL would not know anything about the extension method) so you cannot use it.If you use
DLL/Project reference, your code will be called locally and not through the proxy.