Avoid This Plugin Mistake: Reflection & Dependency Injection in C#
March 11, 2024
• 1,250 views
reflection in C#microsoft mvpc# reflection tutorialc# reflectionwhat is reflection in c#how to use reflection in c#c# reflection examplec# reflectionsc# reflection explainedattributes and reflection in c#c# attributes and reflectionreflection in c#reflection c# explaineddotnet reflectionreflection c#autofacautofac tutorialdependency injection c# autofacc# autofac tutorialdependency injectionplugin architectureiocplugins in C#csharp
When it comes to plugins and building a C# application with a plugin architecture, it's common for reflection to intersect with dependency injection. We often have to do things like scan for assemblies, filter the plugin types that we need to use, or create instances of things to have them available.
However, one common challenge is when C# developers try to mix in Activator.CreateInstance alongside the dependency injection frameworks. In this video, I explain where some of that challenge comes from and how to work around it.
