This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = new ContainerBuilder(); | |
// The thing we want to create haphazardly without ever | |
// disposing it or any of its dependencies: | |
builder.RegisterType<Foo>() | |
.Named<IFoo>("untracked"); | |
// Owned<T> is itself untracked (i.e. disposal is up to the | |
// owner.) Since we just let the Owned<IFoo> slip away, it |
NewerOlder