Orckestra / C1-CMS-Foundation

C1 CMS Foundation - .NET based, open source and a bundle of joy!
https://c1.orckestra.com/
Other
250 stars 109 forks source link

Allow for various extensionpoint-classes to be DI-friendly #821

Open burningice2866 opened 1 year ago

burningice2866 commented 1 year ago

A lovey thing about C1 CMS is its extensibility and how it relies on static typing. This means though that we get a lot of types that are instantiated via reflection and requires a public constructor without arguments.

Not so nice in the world of Dependency Injection.

This is easily fixed though by replacing Activator.CreateInstance with ActivatorUtilities.CreateInstance

https://github.com/Orckestra/C1-CMS-Foundation/search?q=%22Activator.CreateInstance%22&type=code