is it possible to create a generic copy constructor based on protobuf-net? Something like:
public class Person
{
public Int32 Id { get; set; }
public String FirstName { get; set; }
public Int32 Age { get; set; }
public String Name { get; set; }
}
public static void DeepCopyCosntructor<T>(T source, T target)
{
// copy all properties by protobuf-net
}
I want to avoid reflection, but I don't know how to fill the properties of target without recreating a new object.