Closed Hechamon closed 4 years ago
Should fix #86 (or at least be a workaround)
Thanks, @Hechamon! I did catch in the release notes that the constraint had been removed. Do you happen to know what this means from a storage provider perspective? How are the storage providers supposed to create state objects when there is not a parameterless constructor?
Thanks, @Hechamon! I did catch in the release notes that the constraint had been removed. Do you happen to know what this means from a storage provider perspective? How are the storage providers supposed to create state objects when there is not a parameterless constructor?
I was wondering the same thing honestly. To me it feels like that change was done without much consideration up front. In the pull request @ReubenBond says the fix is simple, just remove the constraint. However the way they are generating the objects now, with Activator.CreateInstance<TState>()
, breaks for anything that does not have the parameterless constructor. I wonder if this will cause some bugs in the future.
No worries, @Hechamon! Thanks for contributing the fix so quickly! I'll get it out to NuGet shortly.