Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Autofac コンテナーがあり、登録されているすべてのサービスの種類 (実装の種類ではなく、登録されている種類) を取得できるようにしたいと考えています。
からこの情報を取得するにはどうすればよいIComponentContextですか?
IComponentContext
これを使用できます:
var services = context.ComponentRegistry.Registrations.SelectMany(x => x.Services) .OfType<IServiceWithType>() .Select(x => x.ServiceType);