bsimser / Inventory-Pro

https://devdog.io
MIT License
2 stars 0 forks source link

Add serialization attribute to InventoryItems to allow Serializing of extra data (make attribute override the built-in seriarlizer) #233

Closed bsimser closed 7 years ago

bsimser commented 7 years ago

Original report by Joris Huijbregts (Bitbucket: jjahuijbregts, ).


Add serialization attribute to InventoryItems to allow Serializing of extra data (make attribute override the built-in seriarlizer)

[InventoryItemSerializationModel] public class MyInventoryItemSerializationModel : InventoryItemSerializationModel { // Do custom stuff here, override FromItem and ToItem() }

bsimser commented 7 years ago

Original comment by Joris Huijbregts (Bitbucket: jjahuijbregts, ).


Added serialization attribute that can be added to InventoryItemBase objects to add a custom serialization model (fixes #233)

Example: [SerializationModel(typeof(ExtendedInventoryItemSerializationModel))]

bsimser commented 7 years ago

Original comment by Joris Huijbregts (Bitbucket: jjahuijbregts, ).


Added serialization attribute that can be added to InventoryItemBase objects to add a custom serialization model (fixes #233)

Example: [SerializationModel(typeof(ExtendedInventoryItemSerializationModel))]