klyn.di.DIContext.registerComponent
method

    public registerComponent(name as String, component as Object) as Void:

Description

Registers a component instance under a name.

Parameters

- name Lookup name used to retrieve the component.
- component Component instance to store. ```klyn import klyn.di context = DIContext() context.registerComponent("service", Object()) assert context.getComponent("service") is Object ```