canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binding an abstract type which has an abstract inheritor ToAllImplementations causes StyletIoCRegistrationException

sirdoombox opened this issue · comments

commented

Description
Binding an abstract base type ToAllImplementations() when there is an abstract type in the assembly which inherits from it causes a StyletIoCRegistrationException.

To Reproduce

abstract class Foo { }
abstract class Bar : Foo { }
class FooBar : Bar { }
// ...
builder.Bind<Foo>().ToAllImplementations();

// On Building...
// StyletIoC.StyletIoCRegistrationException: Type Bar is not a concrete class, and so can't be used to implemented service Foo

Version Info

  • Stylet version: 1.3.6
  • Runtime version: 6.0.302