ServiceProvider.getServiceInfoForBaseType

  1. Nullable!(const(ServiceInfo)) getServiceInfoForBaseType(TypeInfo baseType)
    class ServiceProvider
    final @safe const nothrow pure
    Nullable!(const(ServiceInfo))
    getServiceInfoForBaseType
    (
    TypeInfo baseType
    )
  2. Nullable!(const(ServiceInfo)) getServiceInfoForBaseType()

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