I have class Request derived from Dictionary<string, string>. It has additional fields.
Then I have Service Contract: string MakeRequest(Request request);
After that I generate Service Reference for this contract. But VS by some reason generates next code:
string MakeRequest(System.Collections.Generic.Dictionary<string, string> request);
My question is how to tell VS that I want derived class and not base.
I doubt this is possible.
Dictionarysupport seems to be intrinsic.Dictionaryis not a type understood by SOAP so it can't be serialized literally. For example it does not have a[DataContract]attribute. A derived type (maybe with custom fields) could not be serialized.Deriving from
Dictionaryis a bad idea anyway. You probably should either derive fromIDictionaryand wrap a Dictionary exposing it as a property: