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

how to make a singleton service #152

Closed ytianxia6 closed 4 years ago

ytianxia6 commented 4 years ago

Hello, I want to know in Stylet, how to make a service as singleton and how to get it? In other mvvm framework, It's all as some function like registerSingleton, but in Stylet, I never found a function like this. what can i do?

I found the answer in wiki

canton7 commented 4 years ago

https://github.com/canton7/Stylet/wiki/StyletIoC-Configuration#singleton-scope