You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ian Johnson edited this page Feb 17, 2017
·
8 revisions
In addition to collections there are other types that the container will auto resolve for you.
Lazy<T> - importing a Lazy object defers the construction of T till later.
Owned<T> - allows the developer to control the disposal life of T and all it's children. When disposed it will dispose all children. It's especially useful when combined with Func like so Func<Owned<T>>
Scoped<T> - similar to Owned, Scoped creates a new scope and uses it to resolves T. Also like Owned it's intended to be paired with Func<Scoped<T>>
Meta<T> - provides meta data about the type that was imported
Func<Type,object> - imports a func that will locate the Type from the requesting scope
Func<T> - when importing a Func the container will create a delegate on the fly that will locate T from the requesting scope
Custom Delegate - when a delegate that has a return type is requested the framework will create an export strategy that will create a delegate that will pass it's parameters through to be used during the construction of the object graph.