Dreamine.MVVM.Core - Lightweight dependency injection and infrastructure module.
Core container and infrastructure services for the Dreamine MVVM framework.
- Author
- Dreamine
- Date
- 2026-03-15
- Version
- 1.0.0
Dreamine.MVVM.Core
Dreamine.MVVM.Core is the lightweight infrastructure core of the Dreamine MVVM framework.
It provides the minimal runtime foundation required to support explicit architecture, constructor-based resolution, and low-complexity application composition.
This package is intentionally small and focused.
➡️ 한국어 문서 보기
What this library provides
Dreamine.MVVM.Core currently focuses on:
- lightweight dependency registration
- constructor-based object resolution
- singleton and factory-based registration
- minimal infrastructure for Dreamine MVVM modules
Key Features
- DMContainer lightweight dependency injection container
- explicit registration model
- constructor-based resolution
- simple singleton caching
- framework-light architecture
Requirements
Installation
Option A) Project Reference
<ItemGroup>
<ProjectReference Include="..\Dreamine.MVVM.Core\Dreamine.MVVM.Core.csproj" />
</ItemGroup>
Option B) NuGet (future)
NuGet packaging is planned in future releases.
Project Structure
Dreamine.MVVM.Core
└── DMContainer.cs
Quick Start
Register a service
DMContainer.Register<IMyService>(() => new MyService());
Resolve a service
IMyService service = DMContainer.Resolve<IMyService>();
Register a singleton
var service = new MyService();
DMContainer.RegisterSingleton<IMyService>(service);
Component Reference
DMContainer
DMContainer is the central infrastructure component of this package.
Responsibilities:
- register factory delegates
- register singleton instances
- resolve constructor dependencies
- auto-register supported application types
Example:
DMContainer.Register<IMessageService>(() => new MessageService());
var messageService = DMContainer.Resolve<IMessageService>();
Design Goals
Dreamine.MVVM.Core prioritizes:
- explicit behavior over hidden magic
- low dependency surface
- predictable constructor-based composition
- simple extension points for higher-level modules
Related Modules
Typical composition with other Dreamine packages:
- Dreamine.MVVM.Interfaces
- Dreamine.MVVM.ViewModels
- Dreamine.MVVM.Locators
- Dreamine.MVVM.Wpf
License
MIT License
Definition in file README.md.