protobuf-net : how to annotate properties of derived type?
<p>For the latest version of <code>protobuf-net</code> ( <code>r640</code> folder ), how to best annotate a <code>ProtoMember</code> that is a derived type ?</p>

<pre><code>[ProtoBuf.ProtoContract(Name=@"MyBaseTypeProto")]                                       
[Serializable]      
public partial class MyBaseType: ProtoBuf.IExtensible { ... }

[ProtoBuf.ProtoContract(Name=@"MyDerivedTypeProto")]                                        
[Serializable]      
public partial class MyDerivedType : MyBaseType, ProtoBuf.IExtensible { ... }

[ProtoBuf.ProtoContract(Name=@"MyMessageProto")]                                                
[Serializable]                                                                                  
public partial class MyMessage : ProtoBuf.IExtensible                                           
{                                                                                               
    [ProtoBuf.ProtoMember(1, IsRequired = false, Name = @"MyList", DataFormat = ProtoBuf.DataFormat.Default)]
    [System.ComponentModel.DefaultValue(null)]                                                  
    public List&lt;MyDerivedType&gt; MyList;  
</code></pre>

<p>I've tried adding <code>DynamicType</code> property to the <code>ProtoMember</code> attribute but it's not recognized.</p>

<p>I require a solution where the classes can be generated from <code>xml defs</code> of <code>proto types</code>.  So ideally this would be done via attributes annotated onto properties definitions.</p>

<p>It would seem possible to use <code>protogen.exe</code> to generate classes based on message-type defs ( <code>.proto</code> files ) that include <code>import</code> statements : </p>

<pre><code>package MyPackage;                                                          

import "MyDerivedTypeProto.proto";                                                          

message MyMessage{                                                                          
    repeated MyDerivedType MyList = 1;                                                          
}       
</code></pre>

<p>but the <code>import</code> statements apparently have no effect on the generated C# classes ( <code>.cs</code> files ) except to add a comment  :</p>

<pre><code>// Generated from: MyMessageProto.proto
// Note: requires additional types generated from: MyDerivedType.proto
</code></pre>