Dreamine.MVVM.Interfaces 1.0.6

dotnet add package Dreamine.MVVM.Interfaces --version 1.0.6
                    
NuGet\Install-Package Dreamine.MVVM.Interfaces -Version 1.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dreamine.MVVM.Interfaces" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dreamine.MVVM.Interfaces" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Dreamine.MVVM.Interfaces" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dreamine.MVVM.Interfaces --version 1.0.6
                    
#r "nuget: Dreamine.MVVM.Interfaces, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dreamine.MVVM.Interfaces@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dreamine.MVVM.Interfaces&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Dreamine.MVVM.Interfaces&version=1.0.6
                    
Install as a Cake Tool

Dreamine.MVVM.Interfaces

Dreamine.MVVM.Interfaces defines shared abstraction contracts used across the Dreamine MVVM framework.

This package contains contracts only. It does not provide concrete dependency injection containers, WPF navigation implementations, ViewModel locators, or runtime object creation logic.

The purpose of this package is to keep Dreamine modules loosely coupled and to preserve clean dependency direction between framework layers.

➡️ 한국어 문서 보기


What this library provides

Dreamine.MVVM.Interfaces provides contracts for:

  • dependency registration
  • dependency resolution
  • service container composition
  • constructor selection
  • object activation
  • assembly type scanning
  • auto-registration
  • ViewModel resolution
  • navigation
  • event base markers

Package Role

Dreamine.MVVM.Interfaces should remain the lowest-level shared contract package.

Recommended dependency direction:

Dreamine.MVVM.Interfaces
        ↑
Dreamine.MVVM.Core
        ↑
Dreamine.MVVM.Locators / Dreamine.MVVM.Wpf / Application modules

Rules:

  • Dreamine.MVVM.Interfaces must not depend on Dreamine.MVVM.Core.
  • Dreamine.MVVM.Interfaces must not depend on WPF-specific packages.
  • Implementations should live in higher-level packages.
  • Consumers should depend on the smallest interface they need.

Project Structure

Dreamine.MVVM.Interfaces
├── DependencyInjection
│   ├── IAssemblyTypeScanner.cs
│   ├── IAutoRegistrationService.cs
│   ├── IConstructorSelector.cs
│   ├── IObjectActivator.cs
│   ├── IServiceContainer.cs
│   ├── IServiceRegistry.cs
│   └── IServiceResolver.cs
├── Events
│   └── IEventBase.cs
├── Locators
│   └── IViewModelResolver.cs
└── Navigation
    └── INavigator.cs

Dependency Injection Contracts

IServiceRegistry

Defines service registration operations.

Supported registration concepts:

  • transient concrete registration
  • transient abstraction-to-implementation registration
  • factory registration
  • singleton instance registration
  • singleton concrete registration
  • singleton abstraction-to-implementation registration
  • registration existence checks

Example implementation usage:

registry.Register<IMyService, MyService>();
registry.RegisterSingleton<ISharedState, SharedState>();

IServiceResolver

Defines service resolution operations.

TService service = resolver.Resolve<TService>();
object service = resolver.Resolve(typeof(TService));

IServiceContainer

Combines IServiceRegistry and IServiceResolver.

Use this only when a component genuinely needs both registration and resolution capabilities.

For better interface segregation:

  • depend on IServiceRegistry when only registration is needed
  • depend on IServiceResolver when only resolution is needed

IConstructorSelector

Selects the constructor used during object activation.

Concrete implementations may choose constructors by policy, for example:

  • largest parameter count
  • explicit attribute
  • parameter resolvability

IObjectActivator

Creates object instances using constructor injection.

It receives an IServiceResolver so constructor dependencies can be resolved without directly depending on a concrete container.


IAssemblyTypeScanner

Scans assemblies and returns loadable types.

This allows implementations to safely handle partially loadable assemblies and ReflectionTypeLoadException scenarios.


IAutoRegistrationService

Defines the contract for convention-based auto-registration.

Concrete implementations decide:

  • which assemblies are scanned
  • which types are eligible
  • which lifetime policy is applied

Locator Contract

IViewModelResolver

Defines a minimal ViewModel resolution strategy.

object? viewModel = resolver.Resolve(typeof(MainWindowViewModel));

Typical implementers:

  • DI-backed ViewModel resolver
  • manual factory resolver
  • test resolver

INavigator

Defines the minimal navigation contract used by Dreamine navigation implementations.

navigator.Navigate(viewModel);

INavigator intentionally accepts an object ViewModel to keep the contract independent from WPF UI types. Concrete navigation behavior belongs to WPF-specific packages.


Event Contract

IEventBase

Marker interface for Dreamine event classes.

It can be used by source generators, scanners, or framework conventions to identify event objects without introducing concrete dependencies.


Design Goals

Dreamine.MVVM.Interfaces prioritizes:

  • dependency inversion
  • interface segregation
  • low coupling between modules
  • testable infrastructure boundaries
  • UI-framework independence
  • replaceable implementations
  • stable contracts for Core, Locators, WPF, and application modules

Requirements

  • .NET: net8.0
  • No WPF dependency
  • No concrete runtime implementation dependency

Installation

dotnet add package Dreamine.MVVM.Interfaces

Or add to your project file:

<ItemGroup>
  <PackageReference Include="Dreamine.MVVM.Interfaces" Version="1.0.4" />
</ItemGroup>

Typical implementations and consumers:

  • Dreamine.MVVM.Core
  • Dreamine.MVVM.Locators
  • Dreamine.MVVM.Locators.Wpf
  • Dreamine.MVVM.Wpf
  • Dreamine.MVVM.Behaviors.Core
  • Dreamine.MVVM.Behaviors.Wpf

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Dreamine.MVVM.Interfaces:

Package Downloads
Dreamine.MVVM.Locators

Registration and resolution helpers for ViewModels and services in Dreamine MVVM.

Dreamine.MVVM.Locators.Wpf

WPF-specific locator components for automatic View-to-ViewModel wiring and dependency injection in Dreamine MVVM.

Dreamine.MVVM.FullKit

All-in-one package for Dreamine MVVM on WPF. Includes core MVVM modules and automatic source generator integration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 251 4/30/2026
1.0.5 113 4/29/2026
1.0.4 234 3/21/2026
1.0.3 215 5/31/2025
1.0.2 267 5/26/2025
1.0.1 239 5/25/2025
1.0.0 242 5/25/2025