Four ways to attach metadata to a registration -- loose strings, a strongly-typed class, an interface, and attributes -- and then filtering on it at the point of injection.
Packages: Autofac, Autofac.Extras.AttributeMetadata
Run dotnet run --project src/AttributeMetadataExample. It writes one line per metadata style.
See Component Metadata for the documentation this example follows.