i am newbie to nettcpbinding callback function,
i have scenario where i need to get the result based on the parameter pass ex. messageId and get the result data when publisher publised based on messageId to the subscribe client.
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this with the
KnownTypeattribute.Your result classes have to inherit from a base class which is decorated with all the possible derived classes:
This will allow all derived classes to be serialized properly.
Then use the base class in your contract interface:
And in the implementation, pass back instances of the correct derived class: