title: proto file for multiple inheritance
body: <p>This is the way my classes are modelled. sorry it's long:</p>
  
  <pre><code>[Serializable]
  [DataContract]
  public class RequestSection
  {
      [DataMember(Order = 1)]
      public List&lt;BaseA&gt; Allrequests;
  
      public RequestSection()
      {
          Allrequests = new List&lt;BaseA&gt;();
      }
  }
  [Serializable]
  [DataContract]
  [ProtoInclude(2, typeof(BaseA&lt;derResponse1&gt;))]
  [ProtoInclude(3, typeof(BaseA&lt;derResponse2&gt;))]
  public abstract class BaseA
  {
      [DataMember(Order = 1)]
      public int baseA = 10;
  }
  
  [Serializable]
  [DataContract]
  [ProtoInclude(2, typeof(der1))]
  [ProtoInclude(3, typeof(der2))]
  public abstract class BaseA&lt;T&gt; : BaseA where T : ResponseBaseA, new()
  {
      T _Response;
      /// &lt;summary&gt;
      /// 
      /// &lt;/summary&gt;
      [System.Runtime.Serialization.DataMember(Order = 1)]
      public new T Response
      {
          get { return _Response; }
          set { _Response = value; }
      }
  }
  
  [Serializable]
  [DataContract]
  public class der1 : BaseA&lt;derResponse1&gt;
  {
      [DataMember(Order = 1)]
      public int derive1 = 20;
  }
  [Serializable]
  [DataContract]
  public class der2 : BaseA&lt;derResponse2&gt;
  {
      [DataMember(Order = 1)]
      public int derive2 = 30;
  }
  
  [Serializable]
  [DataContract]
  [ProtoInclude(2, typeof(derResponse1))]
  [ProtoInclude(3, typeof(derResponse2))]
  public abstract class ResponseBaseA
  {
      [DataMember(Order = 1)]
      public int responseBaseA = 100;
  }
  [Serializable]
  [DataContract]
  public class derResponse1 : ResponseBaseA
  {
      [DataMember(Order = 1)]
      public int derResp1 = 200;
  }
  [Serializable]
  [DataContract]
  public class derResponse2 : ResponseBaseA
  {
      [DataMember(Order = 1)]
      public int derResp2 = 300;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>the way we create them is here</p>
  
  <pre><code>RequestSection section = new RequestSection();
  der1 der1 = new der1();
  der2 der2 = new der2();
  
  section.Allrequests.Add(der1);
  section.Allrequests.Add(der2);
  </code></pre>
  
  <p>Iam not able to serialize section using protobuf-net(both v1 and v2 - they say unknown subtype) so im trying runtime model. </p>
  
  <p>Here is the proto file iam using.</p>
  
  <pre><code>message RequestSection{
      repeated BaseA requests=1;
  }
  message BaseA{
      optional int32 baseA=1;
      optional BaseA1Generic BaseA1Generic =2;
      optional BaseA2Generic BaseA2Generic =3;
  }
  message BaseA1Generic{
      optional ResponseBaseA baseResponse =1; 
      optional Der1 requestDer1 = 2;
  }
  message BaseA2Generic{
      optional ResponseBaseA baseResponse =1; 
      optional Der2 requestDer2 = 3;
  }
  message ResponseBaseA{
      optional int32 responseBaseA = 1;
      optional derResponse1 derivedResponse1 =2;   
      optional derResponse2 derivedResponse2 =3;   
  }
  message derResponse1{
      optional int32 derResponse1 = 1;
  }
  message derResponse2{
      optional int32 derResponse2 = 1;
  }
  message Der1{
      optional int32 d1=1;
  }
  message Der2{
      optional int32 d2=1;
  } 
  </code></pre>
  
  <p>Its not deserializing on Java side and getting only this </p>
  
  <pre><code>requests {
    baseA: 10
    1000: "\302&gt;\002\b\024"
  }
  requests {
    baseA: 10
    1001: "\302&gt;\002\b\036"
  }
  </code></pre>
  
  <p>I am trying to make my proto file generic because I may have any class(der1/der2/ or more in future) under section requests.</p>