Given the following code:
class Data
{
public List<int> numbers = new List<int>();
}
Where MetaType.UseConstructor is set to false (in order or avoid creating an empty constructor), I'd like to find a way to actually store the empty container. I'm aware that protobuf-net is going to correctly serialize/deserialize if the list has at least one item, but if the list is empty, I got a null reference when deserializing. Of course its resolved by using constructors, but while integrating protobuf-net to a large codebase, having to create an empty constructor for each class is super hard and creates ambiguities for constructors with all-optional parameters.
Can protobuf-net correctly store a valid reference to an empty container?