WPF Reflections

Feb 8 2008   4:24PM GMT

WPF and WCF

Mark Shurmer Profile: MarkWPF

I have been trying to get a three tier LOB system working over the past few weeks.

As part of that , I did discover one cool thing about WCF with relation to WPF.
That is, it’s dead easy to specify which collection class you wish to use when the WCF classes are generated on the client.

For example, for WPF you may want ObservableCollection in your business classes instead of an array or List<>
Unfortunately you can’t do it via the GUI for adding service references, but you can do it on the command line by specifying the /ct parameter when running SvcUtil, e.g.:

svcutil /edb /o:DataService /r:”c:\somewhere\mydll.dll” /ct:Utils.ObservableList`1

Here I use my own version of ObservableCollection called ObservableList in a dll called mydll.dll. If you just want to use standard ObservableCollection, then you won’t need the /r parameter

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: