Westwind.ApplicationConfiguration icon indicating copy to clipboard operation
Westwind.ApplicationConfiguration copied to clipboard

Fixed array instantiation bug in AppConfiguration read method

Open johnmckay-reward opened this issue 10 years ago • 2 comments

I found a bug in the Read method where, if you have a property which is an array and attempt to use reflection to create an instance, you get a "No Parameterless Constructor" exception.

Maybe this doesn't happen in .net 4 or earlier, or maybe was missed as it's more common to use generic lists as opposed to arrays, but fixed it anyway.

johnmckay-reward avatar May 02 '15 15:05 johnmckay-reward

Thanks for this.

Is there any reason why you would use an array here as opposed to a generic List<>? It would seem strange to use an array when you have control over the interface of the configuration class.

RickStrahl avatar May 03 '15 14:05 RickStrahl

No worries

No good reason to be honest, just wanted to change as little as possible to fix the problem as was working with already functional code, just upgrading from MVC4 to MVC5 and upgrading the libraries used in the process

johnmckay-reward avatar May 03 '15 14:05 johnmckay-reward