public void GenericAreaObjectCollection_Add_enhancedAreaObject() { var areaObjectCollection = new GenericAreaObjectCollection <EnhancedAreaObject>(); areaObjectCollection.Add( new AreaId() { X = 1, Y = 1 }, new EnhancedAreaObject() { AreaId = "My Area", SomeCoolAttribute = "I'm a better AreaObject" }); _output.WriteLine(areaObjectCollection.ToJson()); /* * "map": { * "1": { * "1": [ * { * "AreaId": "My Area", * "SomeCoolAttribute": "I'm a better AreaObject" * } * ] * } */ }
public void GenericAreaObjectCollection_Add_areaObject() { var areaObjectCollection = new GenericAreaObjectCollection <AreaObject>(); areaObjectCollection.Add( new AreaId() { X = 1, Y = 1 }, new AreaObject() { AreaId = "My Area" }); _output.WriteLine(areaObjectCollection.ToJson()); /* * "map": { * "1": { * "1": [ * { * "AreaId": "My Area" * } * ] * } */ }