get<TService> method

TService get<TService>()

Gets an instance of the given TService. Throws ActivationException when there are errors resolving the service instance.

Implementation

TService get<TService>() {
  final producer = _producers[TService];
  if (producer == null) {
    throw ActivationException(TService);
  }
  return producer.create();
}