Edit

Share via


RootServiceKey class

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The RootServiceKey is a lookup key that is used when calling ServiceScope.consume() to fetch a dependency that is ever expected to only be created or provided once.

Extends

Remarks

The lookup id for a RootServiceKey will be same as the name of the key, and every RootServiceKey will be placed at the root of a ServiceScope (ensuring that it will always be searchable within a ServiceScope). These are the only differences between a ServiceKey and a RootServiceKey.