Automatic Module Discovery With Autofac – Simplified Registration
If you're familiar with Autofac and module registration but want to make things easier, automatic module discovery might be for you! Let's see how it works!
Autofac is a very popular dependency injection framework. This content will likely include C# code examples showing usage of Autofac for managing dependencies.
If you're familiar with Autofac and module registration but want to make things easier, automatic module discovery might be for you! Let's see how it works!
Want to have a plugin architecture that supports dynamic loading for Blazor? Follow this tutorial for a Blazor plugin architecture that leverages Autofac!
Like building ASP.NET web applications and want to maximize extensibility? This guide is a how-to on using a plugin architecture in Blazor. Check it out!
Whether it's an ASP.NET Core or console app, we can use the decorator pattern with Autofac for powerful results! Let's explore an Autofac example for each!
Want to know how the decorator pattern works? Let's check out an Autofac example in C# where we can get the decorator pattern with Autofac working!
Want more flexible, extensible, and testable code? We'll use Autofac net core! What is Autofac? It's a powerful Dependency Injection framework in dotnet!
Let's dive into the plugin architecture design pattern, exploring how it can be leveraged in ASP.NET Core to create more flexible and maintainable applications.
I love dependency injection frameworks ever since I started using them. Specifically, I'm obsessed with using Autofac and I have a hard time developing applications unless I can use a solid DI framework like Autofac! I've recently been working with Xamarin and found that I wanted to use dependency injection, but some of the framework doesn't support this well out of the box. I' was adamant to get something going though, so I wanted to show you my way to make this work. Disclaimer: In its current state, this is certainly a bit of a hack. I'll explain why I've taken this approach though! In your Android projects for Xamarin, any class that inherits from Activity is responsible for being created by the framework. This means where we'd usually have the luxury of passing in dependencies via a constructor and…
Organizing code into Autofac modules can make maintaining code much easier and improve extensibility! It all starts with the Autofac module class. Check it out!
In Unity3D, the scripts we write and attach to GameObjects inherit from a base class called MonoBehaviour (and yes, that says Behaviour with a U in it, not the American spelling like Behavior... Just a heads up). MonoBehaviour instances can be attached to GameObjects in code by calling the AddComponent method, which takes a type parameter or type argument, and returns the new instance of the attached MonoBehaviour that it creates. This API usage means that: We cannot attach existing instances of a MonoBehaviour to a GameObject Unity3D takes care of instantiating MonoBehaviours for us (thanks Unity!) ... We can't pass parameters into the constructor of a MonoBehaviour because Unity3D only handles parameterless constructors (boo Unity!) So what's the problem with that? It kind of goes against some design patterns I'm a big fan of, where you pass your object's…