Open GoogleCodeExporter opened 8 years ago
Can you be more specific about where IEntity is used in this scenario, so that
I can repro?
Original comment by marc.gravell
on 24 May 2013 at 9:00
I have two assemblies, one with the classes implementing the interfaces
and one with the interfaces, I had to use DynamicType to make it work,
because I can't know what types are going to implement my interface. So in
my first assembly I have a bunch of interfaces like this
[ProtoContract]
public interface IEmail
{
[ProtoMember(1)]
int Id{get; set;}
[ProtoMember(2)]
string Name{get; set;}
}
etc ...
In my second assembly I have the implementations
[ProtoContract]
public class ContactEntityCustom
{
[ProtoMember(1,DynamicType=true)]
public LIst<IEmail> Emails {get; set;}
}
[ProtoContract]
public class EmailCustom:IEmail
{
[ProtoMember(1)]
public int Id {get; set;}
[ProtoMember(2)]
public string Name {get; set;}
}
on IEmail in ContactentityCustom is where the error raises
Original comment by irving.r...@gmail.com
on 24 May 2013 at 6:51
I'm not sure this is your problem, but have you tried specifying the
ProtoInclude?
[ProtoContract]
[ProtoInclude(3, typeof(EmailCustom))]
public interface IEmail
{
[ProtoMember(1)]
int Id{get; set;}
[ProtoMember(2)]
string Name{get; set;}
}
Original comment by xeri...@gmail.com
on 4 Jun 2013 at 2:19
[deleted comment]
It cannot be used in that way. Because the interfaces are in a separate dll,
they have no knowledge of the types that will implement them. I've attached an
example
Original comment by irving.r...@gmail.com
on 7 Jun 2013 at 6:44
Attachments:
Original issue reported on code.google.com by
irving.r...@gmail.com
on 24 May 2013 at 12:45