Questions tagged [tinyioc]

a .NET-based Inversion of Control container for small projects & libraries.

75 questions
1
vote
2 answers

TinyIoC and the decorator pattern

Can someone please provide a simple example of how to implement the decorator pattern with TinyIoC? A previous question shows how to do this in Ninject with the following: Bind().To
Ken Burkhardt
  • 3,528
  • 6
  • 33
  • 45
1
vote
1 answer

TinyIOC and multiple user specified factories for type

I'm currently trying to wire up a custom ReactiveUI IMutableDependencyResolver using TinyIOC. And I'm struggling with the fact that ReactiveUI wants to register multiple interface implementations with user specified factories. Which TinyIOC does not…
Oliver Weichhold
  • 10,259
  • 5
  • 45
  • 87
1
vote
2 answers

TinyIOC constructor injection

In Tiny IOC how does one get the type that it is being resolved for. For instance logging: container.Register((c, p) => { return…
maxfridbe
  • 5,872
  • 10
  • 58
  • 80
1
vote
2 answers

Resolving constructor dependency on service used in NancyFX

I have the following bootstrap public class NancyBootStrapper: DefaultNancyBootstrapper { protected override void ConfigureRequestContainer(TinyIoC.TinyIoCContainer container, NancyContext context) { …
andycwk
  • 826
  • 2
  • 9
  • 19
1
vote
1 answer

TinyIoC and release build

I'm doing my first Release build, and am having problems with TinyIoC and resolving interfaces used via TinyIoC. The architecture we've got is: Universal.Mobile.Droid.application - main application Universal.Mobile.Droid.Interfaces - contains…
James Lavery
  • 920
  • 4
  • 25
0
votes
0 answers

Providing a fallback for FreshMVVM IOC resolution rather than replacement

FreshMVVM uses an implmentation of TinyIOC for simple IOC and whilst that has worked fine for us for a while I need to work more closely with the Shiny Framework and need to register dependencies with that. I do not want to register dependencies…
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
0
votes
1 answer

What is the point in one type argument in Register instead of two argument types Register?

In dependency injection I understand why we need Register() with 2 type arguments. myContainer.Register(); From now on, parameters of type I1, in ctors, will get the instance of A. It's great. We don't need to deal with the creation and the…
S Itzik
  • 494
  • 3
  • 12
0
votes
0 answers

Xamarin Android TinyIoC.TinyIoCResolutionException Unable to resolve type after updating API target to API 28

I want to be able to inject dependencies with my IoC container without running into the TinyIoC.TinyIoCResolutionException exception. My Xamarin Android app is using TinyIoC to inject dependencies. On app start up (before anything else happens) all…
Kes Walker
  • 1,154
  • 2
  • 10
  • 24
0
votes
0 answers

Why can't I inject a dependancy into a ContentPage?

Please see the code below: public partial class MyContentPage : ContentPage { public CreditCardView() { InitializeComponent(); } } It works as expected. Now say I want to inject a dependancy: public partial…
w0051977
  • 15,099
  • 32
  • 152
  • 329
0
votes
0 answers

Dependency resolution with .net web api and tinyioc

I have TinyIoc running happily in a .net web api. I just tried to add a service class that uses System.Web.Http.HttpClient. I explicitly register my new class with the container, but, all of a sudden, I have a stack of runtime errors on application…
bbsimonbb
  • 27,056
  • 15
  • 80
  • 110
0
votes
1 answer

Inject a object in NancyFX module

I am trying to use Nancy as self-hosted in a legacy application, so I am trying to change as little as possible. My Nancy's modules need to interact with a instance of a object previously constructed that, from the point of view of Nancy is like a…
Fernando
  • 2,131
  • 3
  • 27
  • 46
0
votes
2 answers

Register and Resolve a Func<> with TinyIoc

I am trying to register a Func with TinyIoc.: container.Register>(() => myObject.MyProperty); and a type that depends on it with a constructor: MyDependentType(Func function) when I use…
HankTheTank
  • 537
  • 5
  • 15
0
votes
1 answer

TinyIoCContainer registration with generics

I am using .NET Nancy's TinyIoCContainer for dependency injection. I am trying to register an interface and its implementation through generics, like so: Register(container, typeof(IUserService), typeof(UserService)); private void…
pkmetski
  • 171
  • 2
  • 9
0
votes
1 answer

TinyIoc register and interface with multiple types

I am trying to register a base interface IService in TinyIoc Currently I have multiple classes that inherit from Iservice for example AuthenticationService and RestService both inherit from base class Service which implements Iservice The way I am…
Train
  • 3,420
  • 2
  • 29
  • 59
0
votes
0 answers

Nancy and TinyIoC causing Stackoverflow

I'm working on a simple REST api to Quartz using Nancy. I have a simple context class: public class QuartzContext : IQuartzContext { public ISchedulerFactory Factory { get; protected set; } public QuartzContext(ISchedulerFactory factory) …
user3791372
  • 4,445
  • 6
  • 44
  • 78