2,155 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
4
votes
2
answers
174
views
How to register and resolve component in Dry IoC that have self registration mechanic?
There is a service IFoo from an external library, which has its own mechanisms for registering its components. I need to register the service in the Dry IoC container, along with its additional ...
1
vote
1
answer
117
views
Spring Boot doesn't fail if 2 same beans are defined
Recently, I worked with standard tasks using Spring Boot and was faced with unexpected behavior.
I have annotation configurations with @Bean annotations and I need to register one of two beans if a ...
1
vote
0
answers
27
views
Lambda Expression Not Executing in Dynamic Array Binding for Interface Implementations with Boost.DI
I am encountering an issue where a lambda expression used to conditionally bind an array of interfaces (Log) based on runtime conditions is not being executed. This problem arises when using boost::di ...
0
votes
1
answer
51
views
resolve two dbcontexts in one solution in .net core with repository pattern
I have two DbContext types:
private static readonly AutomationContext _aContext;
private static readonly RajaDb2Context _bContext;
And I also have two repositories:
public interface IRepository<T&...
2
votes
1
answer
223
views
Do we need IoC containers in typescript if ts-mock-imports exists
So as kind of a foreword I am coming from the world of compiled languages like C# and C++. There when importing types defined in other namespaces or even different assemblies with using or #include ...
0
votes
0
answers
226
views
Laravel's Singleton issue (works in Tinker, not in the served app)
I have an issue with Laravel (version is 10.10). I have created a singleton in AppServiceProvider.php:
public function register(): void
{
$this->app->singleton('customService', \App\Services\...
0
votes
0
answers
143
views
Problem registering two instances of IEnumerable<Type>
I have a problem with SimpleInjector and I don't know how to resolve it. I'm getting the following error:
The configuration is invalid. Creating the instance for type IMiddleware failed. The ...
1
vote
2
answers
456
views
Unity IOC Container. How to resolve instance from IOC container outside of the scope where container was created?
I am new to IOC containers and i am trying to understand how to use them. I understand the concept but I having issues on how to practically apply it. Currently, I am using Unity ioc container to ...
0
votes
1
answer
52
views
Question of lifycycle callbacks of beans in Spring
Spring documentation describes that beans managed by Ioc container are implicitly pre-instantiated by default other than specifying them as being lazy-initialized. I define a child bean definition A ...
0
votes
1
answer
236
views
Autofac assembly scanning with interfaces
Project is built with .NET 7 MVC.
I have created 3 interfaces in my "Application" class library. I will implement these interfaces on my other interfaces or classes.
I want the dependencies ...
0
votes
1
answer
87
views
Autofac WhenInjectInto like Grace/Ninject
i have this implementation with Grace (it's the same in Ninject) but i need use then in Autofac but autofac does not have a "WhenInjectInto" functionality. How can i migrate this code? Thx
...
-1
votes
1
answer
446
views
IocLookupException: E_IOC_LOOKUP_FAILED: Cannot resolve "Adonis/Lucid/Database" namespace from the IoC Container
Getting this error while saving data into postgres using insert query via ADONISJS commands feature.
Followed up the official documentation but not able to solve this.
import Database from '@ioc:...
0
votes
1
answer
662
views
WPF with Dependency Injection using Ioc
I am currently learning how to code in WPF desktop application, and I am following this show a super old tutorial on youtube on the subject: https://www.youtube.com/watch?v=w5kAUCFDRy4&list=...
0
votes
4
answers
721
views
When i use IoC container to control windows in WPF MVVM, Open Window workes, but Close Window doesn't work
I want to create a Interface to control all windows. I used Microsoft.Extensions.DependencyInjection .
Interface IWindowManager and class WindowManager as:
public interface IWindowManager
{
...
0
votes
0
answers
34
views
Resolve a service using Autofac
Im quite lost here guys, there's this plugin for a gameserver (https://github.com/EvolutionPlugins/Dummy/blob/openmod/Dummy/Services/DummyProvider.cs) which i need to access all the tasks from the ...