Add helper methods to EntityPersistentDataReader and EntityPersistentDataWriter
GetKeyArray
GetValueArray
GetEnumerator
RemoveAndDispose (Writer only)
What is the current behaviour?
Consumers of EPD readers/writers are not able to iterate over all of the persistent data. This is an unusual usage bust still required in some situations.
Data in an EPD implements IDisposable but it's easy for the developer to forget to dispose the elements when removing them.
What is the new behaviour?
The pass through methods to the backing collection are now exposed.
GetKeyArray
GetValueArray
GetEnumerator
Add RemoveAndDispose to the writer to help make it easier to correctly remove EPD elements. I'm open to making this the default behaviour of Remove and instead having a RemoveWithoutDispose as a special case method that can be called. Thoughts?
Sounds good. I just figured that because you're dealing with persistent data...which is something special. There's almost no case where you would want to remove and not dispose.
Add helper methods to
EntityPersistentDataReader
andEntityPersistentDataWriter
GetKeyArray
GetValueArray
GetEnumerator
RemoveAndDispose
(Writer only)What is the current behaviour?
Consumers of EPD readers/writers are not able to iterate over all of the persistent data. This is an unusual usage bust still required in some situations.
Data in an EPD implements
IDisposable
but it's easy for the developer to forget to dispose the elements when removing them.What is the new behaviour?
The pass through methods to the backing collection are now exposed.
GetKeyArray
GetValueArray
GetEnumerator
Add
RemoveAndDispose
to the writer to help make it easier to correctly remove EPD elements. I'm open to making this the default behaviour ofRemove
and instead having aRemoveWithoutDispose
as a special case method that can be called. Thoughts?What issues does this resolve?
What PRs does this depend on?
Does this introduce a breaking change?