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

Creating a fallback container/resolver DryIoc

Current working on creating a Prism.DryIoc.Forms project to try out DryIoc (first time!). In Xamarin.Forms there is a native DependencyService and to provide a nice way to migrate towards using Prism I would like to add it as a fallback container in…
joacar
  • 891
  • 11
  • 28
1
vote
1 answer

Initialize a list in DryIoc

If I have something like this : var container = new Container(); container.RegisterInstance("a", serviceKey: "a"); container.RegisterInstance("b", serviceKey: "b"); How do I register a list of string which will contain "a"…
Serge Intern
  • 2,669
  • 3
  • 22
  • 39
1
vote
2 answers

DryIoc ASP.NET 5 Web API

I'm trying to create a new Web API based on the ASP.Net 5 Web API template in VS2015, with DryIoc at container. I've created a new Web API project and installed the DryIoc using package-manager Install-Package DryIoc.Dnx.DependencyInjection…
smolesen
  • 1,153
  • 3
  • 11
  • 29
1
vote
2 answers

DryIOC WebAPI Fallback Controller

I'm using DryIOC.WebAPI to resolve my APIControllers. WebAPI Config is thus: public static class WebApiConfig { public static void Register(HttpConfiguration config) { // Web API configuration and services // Configure Web…
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
1
vote
1 answer

DryIoc - specifying dependency when using constructor injection

Using DryIoc if I register two implementations of the same contract - how can control which implementation to use when using constructor injection? I see you can you register with a key or metadata - is it possible (using an attribute?) to control…
Keir
  • 483
  • 3
  • 10
1
vote
1 answer

DryIoc, how to set the properties to the base class?

I've written the following POC, but I have to admit I'm very confused on how to achieve this. public class Parent { public string Str; public Parent() { } } public class Child : Parent { } public class Program { static void…
Serge Intern
  • 2,669
  • 3
  • 22
  • 39
1
vote
2 answers

Implementation of the Rebus DryIoc Container Adapter

This question is targeted to Rebus inventor. If I wanted to make DryIoc as one of built-in Rebus Container Adapter, do I need to customize certain DryIoc source code?
1
vote
2 answers

DryIoC / Web API 2 / OWIN and session management

Trying to figure out a way to establish session management with DryIoC (v2.0.0-rc4build353), MS OWIN (v3.0.1, WebAPI2 (client v5.2.3) on VS2015, .Net 4.5. I'm wrapping a rather elaborate legacy application with REST API. Strictly API server, no…
Yuriy Gettya
  • 693
  • 10
  • 20
1
vote
0 answers

How to use DryIoC in ASP.Net WebForms Application?

I would like to have some basic sample how to use DryIoC for WebForms application with BasePage (base for all pages) and IRepository and Repository for connection with database (via NHibernate) At the moment it is made using application property…
1
vote
1 answer

DryIoc - Nancy Bootstrapper?

I'm attempting to create a nancy bootstrapper for DryIoc (v2.0 preview). Generally most things seem simple, however DryIoc appears to not obviously support one of the things that Nancy relies on for its bootstrapping. The inbuilt tinyioc container…
Ash
  • 5,057
  • 7
  • 35
  • 49
0
votes
0 answers

What is the name of this pattern (interface inheritance)?

We recently had an issue in C# when working with DI containers and I wanted a clean solution, but I didn't find any resources for my approach. We are using DryIoc heavily and whenever we need a collection of items, there is a Repository or Registry…
Mitja
  • 863
  • 5
  • 22
0
votes
0 answers

The issue with registering two repositories in DryIoc

previously I registered the repository as follows: container.Register( typeof(IAsyncRepository<>), typeof(AsyncRepository<>), reuse: Reuse.Scoped, made:…
0
votes
0 answers

Problems with update DryIoc and automapper

I have updated DryIoc from version 4.8.8 to 5.4.1 and Automapper from version 10.1.1 to 12.0.1. Previously, I registered Automapper using the following method: services.AddAutoMapper(options => { options.ForAllMaps((obj,…
0
votes
0 answers

How to debug a factory func injected via a class constructor using DryIoc

I've been converting a Prism 6 application to Prism 8, and had to swap out Prism.Autofac in the process. I selected Prism.DryIoc as it's substitute and have largely been able to switch over just fine, however some viewmodels accepted a wrapped…
JWard
  • 41
  • 3
0
votes
0 answers

Are DryIoc scoped services tied to an event lifetime the right hammer for this nail?

We have a modular, plug-in based WPF Prism application that uses DryIoc as the IoC container. App.xmal.cs acts as our main composition root during application startup to bootstrap the IoC container and register services. Due to the decoupled,…