DCSIMG
WCF,C# - Manu Cohen-Yashar's Blog

Manu Cohen-Yashar's Blog

Browse by Tags

All Tags » WCF » C# (RSS)
Data Contract topology in WCF 4.0 - DataContractResolver
In WCF 3.x, type resolution was done using the “known types” mechanism. During deserialization, when the serializer encounters an instance that isn’t of the same type as the declared type, it inspects the list of declared “known types” to figure out what type to use. As the author of the service, you could annotate your types/methods with the [KnownType] or [ServiceKnownType] attributes to define the list of possible substitutions. (in code or config) Unfortunately, WCF 3.x doesn’t provide an easy...
Spliting WCF config files
ConfigSource attribute on system.serviceModel section The configSource attribute was firstly introduced in .NET framework 2.0 to support external configuration files. This attribute can be added to any configuration section to specify a an external file for that section. Using an external configuration source can be useful in many scenarios. For instance, you could place a section into an external configSource if you need an easy method to swap settings for the section depending on the environment...
Serializable Dictionary
Serializable Dictionary I wanted to use a dictionary<T> to create a MSMQ message but I found that a dictionary is not serializable. I spoke to a good friend “Adar Wesley” and he gave me the code of a Serializable Dictionary<T> he wrote. So here it is. Enjoy. Download: SerializableDictionary