Force protobuf-net to ignore IEnumerable/ICollection interfaces
问题 How can I get v2 of protobuf-net to ignore the fact that my class implements ICollection, IEnumerable, etc? For this particular scenario, I only want the fields I have flagged as [ProtoMember] to be serialized. I am currently in the process of converting from using protobuf-net v1 to using v2. I have a particular structure which is now serializing incorrectly because of the change. It looks something like the following: [ProtoContract] public class FileTree : ICollection<FilePath>,