Questions tagged [funq]

For issues relating to the Funq Dependency Injection framework.

Funq is lightweight Dependency Injection container optimised for good performance and memory usage.

It's widely used as ServiceStack's Inversion Of Control container.

64 questions
19
votes
5 answers

How to register multiple IDbConnectionFactory instances using Funq in ServiceStack.net

How would you go about registering diferent IDbConnectionFactory instances in Funq and then access them directly within your services? Do named instances somehow come into play here? Is this the best approach to take when using different…
Jeff Mitchell
  • 1,459
  • 1
  • 17
  • 33
12
votes
2 answers

How to use ServiceStack Funq in my own projects

At work we're doing several new web services projects in ServiceStack and taking advantage of Funq in some of them. I'm currently working on a separate project that will consume said web services and was wondering if there was a way for me to use…
enriquein
  • 1,048
  • 1
  • 12
  • 28
11
votes
2 answers

Does Funq support ResolveAll?

Does the Funq IoC container support resolving all registrations for a type? Something like either of these: IEnumerable foos = container.Resolve>(); IEnumerable foos = container.ResolveAll();
Sean Kearon
  • 10,987
  • 13
  • 77
  • 93
7
votes
1 answer

Funq usage in ServiceStack

How can I access Container instance out of controller? I have to use Container.Resolve in my class but how can I access Container instance? Is it singleton? Can I use new Container() or is there any chain like Funq.StaticContainer? Thanks to…
Oguz Karadenizli
  • 3,449
  • 6
  • 38
  • 73
6
votes
1 answer

Does Funq IoC Container support property injection?

I'm looking for an IoC container to use in my Compact Framework application. Trying out Funq I noticed that I can't find a way to do Property Injection with it. I've looked through the discussion on the project's site and the unit tests for it, but…
6
votes
2 answers

servicestack with funq - autowiring by convention

I have a service which takes an IMyDependency in its constructor. IMyDependency, MyDependency and the service all live in the same assembly. MyDependency has a single, public, parameterless constructor. To my surprise, this did not…
5
votes
4 answers

using RavenDB with ServiceStack

I read this post by Phillip Haydon about how to use NHibernate/RavenDB with ServiceStack. I don't see the point about getting the IDocumentStore and open new session every time i need something from the db like this: public class FooService :…
tal952
  • 953
  • 12
  • 18
4
votes
2 answers

ServiceStack Service class with constructor

I’m using Service Stack, and I can´t (or I don´t know how make a Service class with constructor). Here is what I did: public class AppHost : AppSelfHostBase { public AppHost() : base("ClientService", typeof(ClientService).Assembly) …
Mati Silver
  • 185
  • 1
  • 13
4
votes
1 answer

Using Open Generics with Funq

I have the following interface: public interface IWriter For which there are a number of different implementations such as: public class RedisWriter : IWriter I'd like to be able to inject an…
David Brower
  • 2,888
  • 2
  • 25
  • 31
4
votes
2 answers

Funq and disposing of child container

we are using Funq in our windows service to execute some scheduled tasks, and for each round we are creating a child container than create all our objects and on the end disposing child container, we discovered that elements created by this child…
zebra
  • 1,330
  • 1
  • 13
  • 26
4
votes
1 answer

ServiceStack - Dependency seem's to not be Injected?

I have the following repository class: public class Repository : IDisposable where T : new() { public IDbConnectionFactory DbFactory { get; set; } //Injected by IOC IDbConnection db; IDbConnection Db { get { …
CallumVass
  • 11,288
  • 26
  • 84
  • 154
4
votes
1 answer

ServiceStack Funq Container WeakReference proliferation

I recently wrote a small service that handles high amounts of throughput (on the order of 60+ million requests per day) and it is encountering memory issues. At first, I looked through all of the usual suspects convinced that it had to be something…
welegan
  • 3,013
  • 3
  • 15
  • 20
4
votes
6 answers

How can I resolve circular dependencies in Funq IoC?

I have two classes which I need to reference each other. class Foo { public Foo(IBar bar) {} } class Bar { public Bar(IFoo foo) {} } When I do: container.RegisterAutoWiredAs(); container.RegisterAutoWiredAs(); and…
Rickard
  • 2,325
  • 13
  • 22
3
votes
1 answer

ServiceStack multiple implementations of same interface in Funq.Container

In ServiceStack application, I have Funq configured to inject a session per request like this: container.Register(sessionFactoryForDB1); container.Register(c =>…
David Montgomery
  • 1,618
  • 15
  • 28
3
votes
1 answer

ServiceStack's Funq.Container not Newing-Up Properties

My service uses a utility class and that utility class has several public properties. Is there something special I need call to ensure these public properties are setup? The service uses a ASP.NET host. Inside of Global.ASAX I have declared a new…
Ryan D'Baisse
  • 837
  • 11
  • 29
1
2 3 4 5