Questions tagged [dryioc]

DryIoc is small, fast, capable IoC Container for .NET

DryIoc provides modern take on IoC/DI automation with Simplicity of use, Performance, and Features in mind.

236 questions
1
vote
1 answer

Registering a class and getting instance of the returned model using DRYIOC

I want to register and get instance of current user in userviewmodel using DryIoc.Please how do i achieve this. This is the CurrentUserConfig class public class CurrentUserConfig { private IContainer _container; private UserViewModel…
1
vote
2 answers

Resolving new instances with DryIoc when using Reuse.InWebRequest/Reuse.InThread

I'm using DryIoc in a WebApi project. The default reuse is set to Reuse.InWebRequest. In some cases I need to resolve new instances during a request. When using Reuse.InCurrentScope I can resolve new instances like so: public class Foo : IFoo { …
jasper
  • 521
  • 4
  • 17
1
vote
1 answer

Registrations not resolving

The auto-resolving of the .Net Core framework is not finding my registrations inside DryIoC. This using the new .Net Core 2 framework, DryIoC 2.10.7 and DryIoc.Microsoft.DependencyInjection 1.2.2. I cannot update to DryIoC 2.11.7 because the…
ChrisB
  • 13
  • 1
  • 4
1
vote
1 answer

How to resolve the dependencies of a WebAPI Controller with DryIoc

I've been reading through the documentation and I'm a little confused as to how I would achieve this. I have a WebAPI Controller called NewsController which I'll list below. It has a single constructor that currently takes three dependencies. I've…
1
vote
0 answers

Any possibility in MS.Ext.DI to get lmlementationType based descriptors at compile-time

I want to create an adapter for Microsoft.Extensions.DependencyInjection to move a Type based registrations to compile-time if possible. For instance, in Asp .Net Core it means that I need to get somehow service collection of ImplementationType…
dadhi
  • 4,807
  • 19
  • 25
1
vote
1 answer

DryIoC won't inject properties into ASP.NET Core MVC controller

I'm using https://bitbucket.org/dadhi/dryioc/src/589e7c0b356a/NetCore/src/DryIoc.AspNetCore.Sample as baseline. Tried to implement an attribute-based property injection selector with the following: private static PropertyOrFieldServiceInfo…
1
vote
1 answer

Dryioc and multiple threads

I want to use dryioc to manage dependencies required by multiple threads. I want to start threads passing each a job which requires dependencies to be resolved by ioc. Not sure what this should look like ideally any assistance appreciated.
Del
  • 61
  • 1
  • 9
1
vote
1 answer

MediatR gets multiple handlers instances when expected single

I'm using Generic Type Requests and Handlers.If I have more than one IAsyncRequestHandler DryIoc is resolving multiple instances, instead of a single instance, causing MediatR to throw an exception.How can I solve this problem?Please check this…
DMVC
  • 240
  • 1
  • 2
  • 15
1
vote
1 answer

Open Generics Registration

Suppose I have the following classes: public class Setup { } public class Configuration where T : class { internal Configuration(Setup setup) { } } public class Process where T : class { internal Process(Configuration
DMVC
  • 240
  • 1
  • 2
  • 15
1
vote
1 answer

DryIOC, MediatR - DecoratorWith condition evaluated multiple times with keyed parameter

This question is yet another follow-up to a previous question regarding the setup of DryIOC with MediatR and decorators: DryIOC and MediatR: Injection using InResolutionScopeOf for both IAsyncNotificationHandler and IAsyncRequestHandler In this…
djed
  • 141
  • 10
1
vote
0 answers

How to use DryIoc for constructor injection in Windows Phone 8 PhoneApplicationPage?

I tried constructor injection this way: public partial class MainPage : PhoneApplicationPage { private readonly ISomeService service; public MainPage(ISomeService service) { InitializeComponent(); this.service =…
Gabor
  • 3,021
  • 1
  • 11
  • 20
1
vote
2 answers

DryIoC in class libraries

I have a rather simple solution setup: Web Project --> Service layer --> Repositories My IoCbootstrapper class is located in my web project. var c = new Container(); c.Register(); c.Register
1
vote
1 answer

DryIOC and MediatR: Injection using InResolutionScopeOf for both IAsyncNotificationHandler and IAsyncRequestHandler

This question is a follow up to my previous question, DryIOC Decorator and InResolutionScopeOf What I'm trying to do is create EF DbContext instances in the resolution scope of both IAsyncRequestHandler and IAsyncNotificationHandler, meaning the…
djed
  • 141
  • 10
1
vote
1 answer

DryIOC Non-lazy resolution

How can I disable lazy resolution in DryIOC? I need some of my singletons to be instantiated immediately. At the moment I'm doing all my register calls, and then having another block of resolve calls for the ones I need instantiated in the…
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
1
vote
1 answer

DryIOC Sharing Singletons between Facades

I am working on a system that processes financial data, for various financial instruments, on several different timeframes. For example: EUR/USD - m1 Timeframe (1 Minute) - m5 Timeframe (5 Minute) - m15 Timeframe (15 Minute) GBP/USD - m1…
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123