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

# k.DlContainer2

register data & locate it

- Type: bibliothèque
- Identifiant: kfe.kdlcontainer2
- Créateur: k0fe
- URL canonique: https://sbox.watch/fr/libraries/kfe/kdlcontainer2/
- Markdown: https://sbox.watch/fr/libraries/kfe/kdlcontainer2/index.md
- sbox.game: https://sbox.game/kfe/kdlcontainer2/
- Généré: 2026-10-09T10:48:13.615Z

## Statistiques

- dynamique sur 24 h: +0
- Terry Score: --
- Favoris: 0
- Votes positifs: 0
- Votes négatifs: 0
- Mis à jour: 8 juin 2025
- Créé: 17 avr. 2025
- Taille: 3.0 KB
- Fichiers: 5
- Tags: dependency, di, injection, locator

## Description

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 | Identifiant | Joueurs | Favoris | Votes positifs | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| k.ECS | kfe.kecs | 0 | 2 | 3 | 53% | https://sbox.watch/fr/libraries/kfe/kecs/index.md |
| k.Cameras | kfe.kcameras | 0 | 1 | 0 | -- | https://sbox.watch/fr/libraries/kfe/kcameras/index.md |
| k.Constraints | kfe.kconstraints | 0 | 1 | 0 | -- | https://sbox.watch/fr/libraries/kfe/kconstraints/index.md |
| k.Clothing | kfe.kclothing | 0 | 0 | 0 | -- | https://sbox.watch/fr/libraries/kfe/kclothing/index.md |
| k.Extensions | kfe.kextensions | 0 | 0 | 0 | -- | https://sbox.watch/fr/libraries/kfe/kextensions/index.md |
| k.Randomizers | kfe.krandomizers | 0 | 0 | 0 | -- | https://sbox.watch/fr/libraries/kfe/krandomizers/index.md |
