How To Query for a Named Asynchronous Type Registration |
This topic details the steps necessary for checking whether a type is registered with a specific name for asynchronous resolution with a Unity container.
Import the Unity Container Async Extensions namespace:
using Ditto.AsyncInit.Unity;
Query the container for named registration:
if (container.IsAsyncTypeRegistered<IUniversalAnswerService>("Deep Thought")) { //... }