Binary Artist

The Jason Marshall Experience

Binary Artist

Jason Marshall
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sharing WCF Collection Types between Service and Client

This particular feature will get ya ! if your not aware of it.

 

When using the SvcUtil.exe and specifying shared collectionTypes;

The expression in the collectionType switch for a shared collection is followed by a back quote (`) and a 1.
For generic types, you must specify the number of generic parameters with a back quote followed by the number of generic parameters.
Do not confuse the back quote (`) with the single quote (').

"c:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcUtil"
      /language:cs
      /out:ServiceClient.cs 
      /namespace:*,ShareTypes.Client
      /noconfig
      /reference:..\ShareTypes.Common1\bin\Debug\ShareTypes.Common1.dll
      /reference:..\ShareTypes.Common2\bin\Debug\ShareTypes.Common2.dll
      /collectionType:ShareTypes.Common.SharedCollection1
      /collectionType:ShareTypes.Common.SharedCollection2`1
      net.tcp://localhost:9042/Service/mex

Great article here on this topic...

http://www.codeproject.com/KB/WCF/WCFCollectionTypeSharing.aspx


Posted by Admin on Thursday, May 08, 2008 10:27 AM
Permalink | Comments (0) | Post RSSRSS comment feed
Free Hit Counters
page counter