tryAddKeyedSingletonInstance<TService> method

void tryAddKeyedSingletonInstance<TService>(
  1. Object? serviceKey,
  2. Object implementationInstance
)

Implementation

void tryAddKeyedSingletonInstance<TService>(
  Object? serviceKey,
  Object implementationInstance,
) {
  final descriptor = ServiceDescriptor.keyedSingletonInstance<TService>(
    serviceKey,
    implementationInstance,
  );

  tryAdd(descriptor);
}