We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Types can be exported with a key of type object. You can provide it when locating to get that specific one:
object
container.Configure(c => c.Export<FileLogger>().AsKeyed<ILogger>("file")); container.Configure(c => c.Export<ConsoleLogger>().AsKeyed<ILogger>("console")); ILogger fileLogger = container.Locate<ILogger>(withKey: "file"); ILogger consoleLogger = container.Locate<ILogger>(withKey: "console");
You can also use the Key property on the [Import] attribute to pull in a specific export:
Key
[Import]
[Import(Key = "file")] public ILogger FileLogger { protected get; set; }
There was an error while loading. Please reload this page.