Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

I am getting a version mismatch error when using MediatR in my .NET project. What happened: Yesterday my project worked correctly with no errors. Today I updated some NuGet packages by mistake. After ...
YunusTemel's user avatar
Best practices
0 votes
0 replies
22 views

In Asp.Net (not Core) we have InstancePerRequest which uses tagged matching child scopes. In Asp.Net Core they deprecated InstancePerRequest in favour of InstancePerLifetimeScope which as I understand ...
mark's user avatar
  • 63.6k
3 votes
1 answer
98 views

I'm interested in the options for providing ownership or references to dependencies when doing dependency injection in Rust. I don't mean like a DI framework or anything like that, just the general ...
jacobsa's user avatar
  • 7,817
-1 votes
0 answers
16 views

I'm getting the following issue when I build my package. Repeats modules with scoped bindings or declarations - a.b.c.component also includes: - a.b.c.d.module with scopes: @javax.inject.Singleton ...
krishnaraj T's user avatar
3 votes
2 answers
108 views

I have an instance of a Spring ApplicationContext in a method and I need to "probe" it and decide if: it has been fully refresh()ed at least once so I can be sure that the beanFactory is ...
Kostas Filios's user avatar
2 votes
1 answer
70 views

I run into a runtime error when using autofac in combination with hybrid cache and redis. I hope someone can explain why this error occurs. When using autofac to resolve an instance of HybridCache in ...
Elzo Lubbers's user avatar
-3 votes
1 answer
79 views

I have the following 2 classes. MyClass composes MyOtherClasses. Each of them requires different ILogger<foo>: public class MyClass { private readonly ILogger<MyClass> _logger; ...
khteh's user avatar
  • 4,280
1 vote
1 answer
54 views

I have a class Handler with interface IHandler that depends on IService, which in turn has two implementations ServiceA and ServiceB. Then I have a class Consumer which depends on Handler and knows at ...
user5717448's user avatar
0 votes
3 answers
141 views

Say I have this interface: public interface IExample { string GetSupportedExtension(); void DoWork(Stream input); } a concrete implementation like: public class PdfExample : IExample { ...
Kiblinix's user avatar
2 votes
1 answer
117 views

I'm setting up an Android project, where I've separated the code into different modules to have a bit of a cleaner structure. The modules are presentation, domain, data, di and app. I am including a ...
binkypv's user avatar
  • 65
1 vote
0 answers
75 views

I currently have a ServiceProvider that registers certain types from the current assembly within one container. I am trying to implement a separate prism dialogservice that would register only ...
gwiz_kid's user avatar
  • 143
1 vote
2 answers
119 views

I want to create a repository base class, every service should inherit from this BaseService. This is my code: public class BaseService<TEntity, TAddDto, TUpdateDto, TEntityDto> : IBaseService&...
ross's user avatar
  • 23
1 vote
1 answer
101 views

Consider these model classes: [JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")] [JsonDerivedType(typeof(A), typeDiscriminator: nameof(A))] [JsonDerivedType(typeof(B), ...
aepot's user avatar
  • 4,864
0 votes
1 answer
73 views

The code is used in many projects and works but in one service sometimes an error occurs: "InterfaceError: (sqlalchemy.dialects.postgresql.asyncpg.InterfaceError) <class 'asyncpg.exceptions....
Раенко Тимофей's user avatar
0 votes
0 answers
57 views

I have an ASP.NET Web API project using Autofac for dependency injection. I register a factory for creating ICommandExecutor based on an enum: builder.Register<Func<CommandType, ICommandExecutor&...
Pulkit Sharma's user avatar
0 votes
1 answer
94 views

I have the following code in a basic .NET MAUI app. My main page: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/...
Brudi_Voeller's user avatar
4 votes
2 answers
130 views

I have an abstract base class that used to accept a service via constructor injection: export abstract class BaseEditEventClass<T> extends BaseFormClass { constructor(protected _service: ...
Raphaël Balet's user avatar
1 vote
0 answers
62 views

I have a label provider for my model tree view: public class ModelTreeLabelProvider implements ILabelProvider { @Inject IWorkbench workbench; @Override public Image getImage(Object ...
Árpád Magosányi's user avatar
1 vote
0 answers
74 views

My microservice uses an external dependency which is a JAR build by my company. I can't figure why the bean is not found. *************************** APPLICATION FAILED TO START ***********************...
Ryley38's user avatar
  • 403
0 votes
1 answer
100 views

I wanna have a dynamic module which should take care of registering mongoose for me. Right now I have a problem with injecting the options asynchronously when I am invoking MongooseModule.forRootAsync(...
Mohammad Jawad Barati's user avatar
0 votes
0 answers
50 views

I am using an ASP.NET Core 9.0 Web API with C#. My application setup uses L1 Cache using FusionAPI and L2 is Garnet Server for distributed layer of cache. The following code snippet is from my Startup....
Creative Learner's user avatar
-1 votes
3 answers
103 views

The first method is the normal code execution. The second method is the one that is commented out. Isn't returning an instance of a class from a newly created standalone service provider the same as ...
Bob Bobber's user avatar
1 vote
1 answer
148 views

I want to load all types from an assembly and register them for dependency injection, using the following reflection-heavy method: using System.Reflection; namespace Server { public static class ...
Nitrox Tank's user avatar
1 vote
1 answer
59 views

I'm looking at a way to resolve dependencies using keyed services. I have a very simple interface (for now): public interface ITest<T> { T Get(string key); } With two very simple ...
Jon Selby's user avatar
  • 532
0 votes
1 answer
210 views

The code is used in many projects and everything works. But in one service, sometimes an error occurs on the prod: sqlalchemy.exc.InterfaceError: (sqlalchemy.dialects.postgresql.asyncpg.InterfaceError)...
Раенко Тимофей's user avatar

1
2 3 4 5
542