a .NET-based Inversion of Control container for small projects & libraries.
Questions tagged [tinyioc]
75 questions
1
vote
1 answer
Access registered object in Nancy Startup class
I'm writing a service in Nancy and I'm using some middleware for monitoring the service:
app.UseOwin(buildFunc =>
{
var log = ConfigureLogger();
buildFunc.UseMonitoringAndLogging(log, HealthCheck);
…

David Clarke
- 12,888
- 9
- 86
- 116
1
vote
1 answer
Nancy TinyIoc doesn't use the instance registered
I register my instance ConfigureApplicationContainer:
public class Bootstrapper : DefaultNancyBootstrapper
{
// The bootstrapper enables you to reconfigure the composition of the framework,
// by overriding the various methods and…

pogorman
- 1,641
- 2
- 22
- 41
1
vote
2 answers
DB connection is not closed after request ends in a NancyFx application
I'm building a Nancy web app, and using OrmLite for DB access. I noticed that every request opens up a new DB connection and doesn't close it. I thought that registering the OrmLiteConnection class in the Application container would make it…

ulu
- 5,872
- 4
- 42
- 51
1
vote
1 answer
Unit Testing in Nancy causing Routebuilder exception using TinyIoc
Getting a System.MissingMethodException, Method not found: 'Void RouteBuilder.set_Item()
Get["/foo"] = parameters => { return Bar(Request);};
This runs fine when calling from browser, but fails when testing with this setup
var browser = new…

swhite
- 31
- 5
1
vote
1 answer
Nancy Dependency Injection register multiple
I have a module which is expecting a dependency to be satisfied however I get the an error stating
Something went wrong when trying to satisfy one of the dependencies during composition, make sure that you've registered all new dependencies in the…

Dr Schizo
- 4,045
- 7
- 38
- 77
1
vote
1 answer
Session scoped instances in TinyIoC
I need an instance of a class to be created only once per user session. How do I register such a class with TinyIoC? I'm using NancyFx.

ulu
- 5,872
- 4
- 42
- 51
1
vote
1 answer
IOptions not working with TinyIOC/NancyFX
I'm trying to implement the Options Pattern (as recommended here) on a project with NancyFX/TinyIOC but it's not working.
I'm registering the Options on the Startup.cs.ConfigureServices method but when I try to inject the settings on my class…

Renato Todorov
- 560
- 3
- 15
1
vote
1 answer
TinyIoC register instance of unknown type
I'm trying to allow users of my library, which is internally wired up via tinyioc, to pass in their own implementation of an interface defined within my library which will then be resolved to whenever an instance is needed.
For example, the user can…

tom redfern
- 30,562
- 14
- 91
- 126
1
vote
2 answers
Is it possible to use Property Injection with Nancyfx default TinyIoc container?
Yes I know, it is better to use Constructor Injection and I do use it most of the time but, there is this one scenario where I like to use Property Injection:
I have a repository base class which has dependencies of a database factory and also a…

Auresco82
- 603
- 6
- 14
1
vote
1 answer
TinyIoC Resolve Plugin Contract
How would one go about resolving Plugin contacts using TinyIoC?
Host.exe /w reference to Core.Contract.dll
var container = new TinyIoCContainer();
container.AutoRegister(new[] { Assembly.LoadFrom("Core.Contracts.dll") },
…

Clura.NET
- 11
- 3
1
vote
0 answers
TinyIoC property injection with BuildUp not working in Xamarin.iOS app
I'm having a little trouble figuring out why I can't do property injection in a ViewController in a Xamarin iOS app.
My types are registered and they resolve correctly in my ViewController constructor by using this code:
myService =…

Claus
- 1,975
- 18
- 24
1
vote
1 answer
TinyIOC not registering same types on different debug runs , web api project using Azure emulator
This is driving me nuts ...
I have a web API project . I am getting an odd behaviour . I am running it in a debugger and hitting a method by using fiddler . What is happening is that the API works fine on first the first time I run it in debug after…

Maestairs
- 95
- 1
- 7
1
vote
1 answer
MvvmCross Custom IoC Integration breaks Plugin Registration
I'm trying to integrate TinyIoc with MvvmCross. I followed the instructions from
https://github.com/MvvmCross/MvvmCross/wiki/Customising-using-App-and-Setup#changing-the-ioc-container-that-mvvmcross-uses
and created an adapter
public class…

step
- 35
- 4
1
vote
1 answer
How to register dependency for signalr hub using TinyIocContainer within NancyFx
I'm a little new to NancyFx and TinyIoc, but here goes:
I have been able to use auto registration of TinyIocContainer within NanxyFx to inject dependencies in Nancy Modules which is very neat, thats all fine and working.
But, how do you register a…

Chuen Lee
- 353
- 4
- 17
1
vote
2 answers
Using TinyIoC in Xamarin.Android
I got a bit tired of tall the hard referencing that I found inside a Xamarin.Android app I inherited - Actions referencing actions, funcky stuff happening in callbacks etc. So I decided I would register the Actions in TinyIoC and resolve them when…
user156888