somemdl / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

IgnoreListHandling and Surrogates #348

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. type A that implements IEnumerable<string> and marked as IgnoreListHandling 
and configured with a Surrogate.
2. serialize a type ProtoBufKeyValuePair<A, GenericCacheEntry<A>>

What is the expected output? What do you see instead?

System.InvalidOperationException: Unable to resolve a suitable Add method for A

What version of the product are you using? On what operating system?
2.0.0.612

Is this a known issue or should I submit a regression test?

Original issue reported on code.google.com by e...@apption.com on 2 Jan 2013 at 6:16

GoogleCodeExporter commented 9 years ago
    [ProtoBuf.ProtoContract]
    public class ProtoBufKeyValuePair<K, V>
    {
        [ProtoBuf.ProtoMember(1)]
        public K Key { get; set; }
        [ProtoBuf.ProtoMember(2)]
        public V Value { get; set; }
    }

    [ProtoBuf.ProtoContract]
    public class GenericCacheEntry<V>
    {
        [ProtoBuf.ProtoMember(1)]
        public V Entry { get; set; }
        [ProtoBuf.ProtoMember(2)]
        public int ReadCount { get; set; }
        [ProtoBuf.ProtoMember(3)]
        public double MissCost { get; set; }
    }

Original comment by e...@apption.com on 2 Jan 2013 at 6:18