ÎÜñ|‹ø\/\/ñ [ÐëÞrëçã†ëð]'s Blog

Amit Bahree's insight into stuff...

News

And God said "Let there be light". But then the program crashed because he was trying to access the 'light' property of a NULL universe pointer.

blog roll

calendar

intersting finds

reading

techy finds

Dependencies between Contract Inheritance and CallBack Inheritance in Indigo

Contract inheritance (via CLR interface inheritance) is pretty cool allowing you to support versioning and contract aggregation in WCF, the catch though is if you have a Duplex interface then the callback interface must follow the same hierarchy. So if your primary interface say is IMyInterface which inheritances from ISomeInterfaceOne and ISomeInterfaceTwo, then the callback interface also needs to have the same chain or you will get an InvalidContractException. Here is an example from MSDN:

[ServiceContract(CallbackContract = IACallback)]
interface IA : IB {}
interface IACallback : IBCallback {}
[ServiceContract(CallbackContract = IBCallback)]
interface IB {}
interface IBCallback {}

Posted: Jan 04 2006, 11:39 PM by Amit Bahree | with no comments
Filed under: