provide<T> function

void provide<T>(
  1. FactoryFunc<T> factory
)

Registers a transient factory on the global active Bloom container.

A fresh instance of T is created each time inject is called.

Example

provide<PaymentGateway>(() => StripeGateway());

Implementation

void provide<T>(FactoryFunc<T> factory) => globalContainer.provide<T>(factory);