---
title: "k.DlContainer2 - s&box library"
description: "register data & locate it"
canonical: "https://sbox.watch/ru/libraries/kfe/kdlcontainer2/"
generated_at: "2026-10-09T10:48:13.615Z"
---

# k.DlContainer2

register data & locate it

- Тип: библиотека
- Идентификатор: kfe.kdlcontainer2
- Автор: k0fe
- Канонический URL: https://sbox.watch/ru/libraries/kfe/kdlcontainer2/
- Markdown: https://sbox.watch/ru/libraries/kfe/kdlcontainer2/index.md
- sbox.game: https://sbox.game/kfe/kdlcontainer2/
- Создано: 2026-10-09T10:48:13.615Z

## Статистика

- динамика за 24 ч: +0
- Terry Score: --
- Избранное: 0
- Положительные оценки: 0
- Отрицательные оценки: 0
- Обновлено: 8 июн. 2025 г.
- Создано: 17 апр. 2025 г.
- Размер: 3.0 KB
- Файлы: 5
- Теги: dependency, di, injection, locator

## Описание

DlContainer - Dependency Locator Container (2 cuz first package died for some reason lol)

Quick usage example

Register dependencies
protected override void OnAwake()
{
 base.OnAwake();
 var container = new DlContainer()
 .Register<TestStorage>();

 foreach ( var resource in \_resources )
 {
 container.Register( resource );
 }

 AddFeature( new MyClass( container ) );
}
Resolve dependencies
public class MyClass()
{
 private TestStorage \_testStorage;
 private MyGameResource \_myGameResource;

 public MyClass(DlContainer container)
 {
 \_testStorage = container.Get<TestStorage>();
 \_myGameResource = container.Get<MyGameResource>();
 }
}

It's not perfect, not nearly there even. But it's just easier to resolve dependencies in my ECS framework so f it




## More by k0fe

| Package | Идентификатор | Игроки | Избранное | Положительные оценки | Оценка | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| k.ECS | kfe.kecs | 0 | 2 | 3 | 53% | https://sbox.watch/ru/libraries/kfe/kecs/index.md |
| k.Cameras | kfe.kcameras | 0 | 1 | 0 | -- | https://sbox.watch/ru/libraries/kfe/kcameras/index.md |
| k.Constraints | kfe.kconstraints | 0 | 1 | 0 | -- | https://sbox.watch/ru/libraries/kfe/kconstraints/index.md |
| k.Clothing | kfe.kclothing | 0 | 0 | 0 | -- | https://sbox.watch/ru/libraries/kfe/kclothing/index.md |
| k.Extensions | kfe.kextensions | 0 | 0 | 0 | -- | https://sbox.watch/ru/libraries/kfe/kextensions/index.md |
| k.Randomizers | kfe.krandomizers | 0 | 0 | 0 | -- | https://sbox.watch/ru/libraries/kfe/krandomizers/index.md |
