• About
  • Privacy Policy
  • Utilities
Darchuk.NET

IoC

Autofac–Automatically registering generics via constructors

May 17, 2019 by Robert Leave a Comment

Recently I had a situation where I had a class and interface to make a generic service which would do something based on whatever type is provided.  (Obviously, it was not so contrived…) These would then get injected to other classes to be used as necessary: Which works fine… as long as you remember to … [Read more…]

Posted in: .NET Core, C#, Reflection Tagged: .NET, AutoFac, C#, Csharp, DependencyInjection, Generics, IoC, Reflection

Automatically registering properties as implementations in AutoFac

May 25, 2018 by Robert Leave a Comment

In this post I talked about building out a configuration service that could be split into various areas of concerns so that each piece can be injected where it makes sense (without all of the noise of the rest of the configuration). Previously, the registration looked like this: Reflection With reflection, we can loop through … [Read more…]

Posted in: .NET Core, C#, IoC, Reflection Tagged: AutoFac, C#, Configuration, DI, IoC, Reflection

AutoFac registering properties as implementations

January 5, 2018 by Robert 1 Comment

Recently I’ve been building out something that is very configurable.  Tons of different settings, switches, numbers… you name it.  Its nice to have things split out into areas of concern – that is, different interfaces identifying the configuration settings pertinent to a particular thing – but then you end up with all of these things … [Read more…]

Posted in: C#, IoC Tagged: AutoFac, C#, Configuration, DI, IoC

Recent Posts

  • Allowing trailing JSON commas in ASP.NET Core 3
  • YADNC3JSG–Yet Another .NET Core 3.0 JSON Serializer Gotcha
  • Logging in a .NET Core 3 SignalR client
  • .NET Core 3 unit testing project sdk
  • .NET Core 3.0 Upgrade–New JSON Serializer Gotchas

Recent Comments

  1. Robert on C# Setting Socket Keep-Alive
  2. Oliver Schramm on C# Setting Socket Keep-Alive
  3. John Anderson on Waiting for a keypress asynchronously in a C# console app
  4. Ronald Garlit on .NET Core 3 unit testing project sdk
  5. Ronald Garlit on .NET Core 3 unit testing project sdk

Copyright © 2025 Darchuk.NET.

Omega WordPress Theme by ThemeHall