canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
988 stars 143 forks source link

IStyletIoCBuilder is not working #130

Closed hdzs closed 4 years ago

hdzs commented 4 years ago

Here are your instructions: // First, create the builder var builder = new StyletIoCBuilder();

// Configure the builder builder.Bind().To();

// The container is then built for you

// Now you can use this to resolve instances of services var vehicle = ioc.Get();

But I did not find the relevant interface(ioc.get???), is it because of the version problem?Below is my screenshot: image

canton7 commented 4 years ago

I'm not sure where you got those instructions from, but the line you're missing is:

var ioc = builder.BuildContainer();

The bootstrapper does this for you, and sets the container property on Bootstrapper<T>