private void PreventNull() { if (item == null) { item = new ItemModel(0, 0); } }
void ISerializationCallbackReceiver.OnBeforeSerialize() { item = Item; PreventNull(); }