In the protobuf-net v3 release notes, one of the breaking changes is: non-generic list-like APIs like IList
or ICollection
are no longer supported; there is a new API for processing custom collection types.
I've been looking through the repo, but haven't been able to figure out the details. Would someone be able to provide an example on how to migrate this data contract to v3?
Here is an example:
[DataContract]
public class Data
{
[DataMember(Order = 1)]
public IList<DataEntry> DataEntries
}
[DataContract]
public class DataEntry
{
[DataMember(Order = 1)]
public string Name;
}
No change is necessary. You are using IList<T>
, which is the generic API. The thing that isn't supported is using the old non-generic IList
(with no <T>
)