ServiceProvider.getServiceInfoForBaseType

  1. Nullable!(const(ServiceInfo)) getServiceInfoForBaseType(TypeInfo baseType)
  2. Nullable!(const(ServiceInfo)) getServiceInfoForBaseType()
    class ServiceProvider
    final const
    Nullable!(const(ServiceInfo))
    getServiceInfoForBaseType
    (
    alias BaseType
    )
    ()

Return Value

Type: Nullable!(const(ServiceInfo))

The ServiceInfo for the given baseType, or null if the baseType is not known by this ServiceProvider.

Examples

static class C {}

auto info = ServiceInfo.asScoped!C();
const provider = new ServiceProvider([info]);

assert(provider.getServiceInfoForBaseType!C() == info);

Meta