I'm trying something like this:
[ServiceContract (
CallbackContract = typeof (CallbackContract_1),
CallbackContract = typeof (CallbackContract_2),
CallbackContract = typeof (CallbackContract_3))
]
public interface SomeWcfContract {
I know it does not work like this. Is there still a way to get a single contract use multiple callback interfaces?
A service contract can only designate a callback contract if that contract is a subinterface of all callback contracts defined by the contract's own base contracts.
interface ICallbackContract1
{...}
interface ICallbackContract2 : ICallbackContract1
{...}
[ServiceContract(CallbackContract = typeof(ICallbackContract1))]
interface IMyBaseContract
{...}
[ServiceContract(CallbackContract = typeof(ICallbackContract2))]
interface IMySubContract : IMyBaseContract
{...}
or
interface ICallbackContract1
{...}
interface ICallbackContract2
{...}
interface ICallbackContract3 : ICallbackContract2,ICallbackContract1
{...}
[ServiceContract(CallbackContract = typeof(ICallbackContract1))]
interface IMyBaseContract1
{...}
[ServiceContract(CallbackContract = typeof(ICallbackContract2))]
interface IMyBaseContract2
{...}
[ServiceContract(CallbackContract = typeof(ICallbackContract3))]
interface IMySubContract : IMyBaseContract1,IMyBaseContract2
{...}
see for more details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With