Thanks Bruno and all the best with your trip.
It might not be such a natural solution to set those in the ServiceBehavior attributes applied to a class.
Imagine I need to tell to my fellow developers: Set ConfigurationName to something, set TransactionTimeout to something, not that we have got such a configuration element in the config file or use Transactions for this service, it is just because we use Spring ....
I can't get away with this .
Just to brainstorm:
We may avoid setting properties on the attribite that are null, we can avoid including it in the array of PropertyInfo send to the CustomAttributeBuilder.
We can update the following code in the ReflectionUtils.CreateCustomAttribute method from:
if (pi.CanRead && pi.CanWrite)
if (pi.CanRead && pi.CanWrite && pi.GetValue(sourceAttribute, null) != null)
I ran only few tests, but it seems to do the thing for us.
I can't currently see any problem with excluding those properties and it seems to be right to exclude them.
Let me please know what now
regards and thanks,
P.S. As for the version we use, it is 20070515-2213 and we are going to update to 20070618-2221 in a couple of days, so looking forward to play with WcfQuickStarts