In creating my WCF client program, I know that I can set parameters like maxItemsInObjectGraph
(or any other) in the app.config file as follows:
<behaviors>
<endpointBehaviors>
<behavior name="endpointBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
But how/where could I hard-code this parameter instead? For what I've read so far it seems that this info can go in the Client's proxy file. Is something like
[endpointBehaviors(maxItemsInObjectGraph = "2147483647")]
...at the start of a proxy file the same as the XML above?
I am inferring that syntax based on the text in the question:
The parameter will not change and therefore would be better to hard-code it and not include it in the config file. I just need to know how to take what's in the config file and translate it to hard code