Skip to content

Add more Container constructors #127

@Chingling152

Description

@Chingling152

Summary

Add default constructors to Container<T>, StackContainer<T>, and LazyStackContainer<T> that internally instantiate their respective Slot implementations, removing the current requirement to use Dependency Injection for basic usage.

Motivation

At the moment, these container types can only be instantiated by providing their Slot dependencies via DI.
Requiring the Creation of the Slots in all cases raises the entry barrier of the API and makes some simple scenarios more complex than needed.

Proposed Solution

Introduce additional default constructors for Container<T>, StackContainer<T>, and LazyStackContainer<T> that might work as Factory methods.

Sub-issues

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

Status

🔖 To do

Relationships

None yet

Development

No branches or pull requests

Issue actions