There are two ways to make the DataContract class a constructor. Probably the most consistent way is to transfer the DataContract to a separate class library that you specify in your service and client. As John Saunders stated, there is a way to tell Visual Studio to use an existing class when creating proxy code for the specified service. After that, you can simply add a constructor to this class.
If you want the constructor to be displayed only on the client side or for some other reason could not use the shared class library, you can create a partial class. For such a class, there really is no specific "location". All that is required to provide the constructor through a partial class is to create a new class file that defines the same class as your proxy.
, , - ReferencedServiceProxy.ContractClass, ,
namespace ReferencedServiceProxy
{
partial class ContractClass
{
public ContractClass()
{
}
}
}
, .
, , , , , "" .
http://mehranikoo.net/CS/archive/2007/11/09/DataContractConstructorsInWCF.aspx -, , . , , Silverlight, OnDeserialization.