My favorites | Sign in
Logo
                
Search
for
Updated Jun 27, 2008 by slava42
CheatSheet  
Frequently and Not-yet-asked Questions.

Features

How is Property Injection done on reflection-created components?

How are circular dependencies handled?

How is method injection done?

Where is InstanceScope.Thread?

How can I retrieve more than one component for the same service?

API

What is the difference between Activating/OnActivating and Activated/OnActivated?

How do I provide parameters to Resolve()?

How do I decorate instances?

Why, oh why, is Singleton the default scope?

Integration

How do I integrate Autofac into my app?

Can Autofac cause memory leaks?

Singletons

Autofac uses strong reference to hold onto singleton components. This objects will exist at least for as long as Autofac container exists.

Factory scoped

Factory scoped components that are owned by the container are held using weak references, so that they can be disposed at the appropriate time or earlier in the case that they can be garbage-collected.

Factory scoped components with external ownership are not referenced by Autofac at all - the reference returned from Resolve() will be the only reference at that point.

Autofac should never cause memory leaks. For more information on tracking down leaks in .NET see Memory Leak Detection in .Net article

Deployment

How can I tune performance?

I'm bored, what else can I read?

Check out BestPractices and OnTheWeb for some more Autofac reading.


Sign in to add a comment
Hosted by Google Code