addInstance<TService extends Object> method

void addInstance<TService extends Object>(
  1. TService instance
)

Registers a singleton service of the specified TService type using the specified instance.

Implementation

void addInstance<TService extends Object>(TService instance) {
  add(ServiceDescriptor.instance<TService>(instance));
}