of Seven Themes of NopCommerce Architecture Analysis Theme Skin Manager

  • 2021-07-16 02:15:41
  • OfStack

IThemeContext: Skin context, supports desktop skin and mobile segment skin. Its entity class is: ThemeContext;;

IThemeProvider: Skin provider whose entity class is ThemeProvider; The skin provider parses the configuration items from the skin configuration file and loads all the skin schemes provided by the system. The system provides desktop clean skin (~/Themes/DefaultClean) and mobile skin (~/Themes/Mobile) by default. ThemeConfiguration is a parsing object for theme. config data.

IThemeContext gets the resolved configuration scheme from IThemeProvider.

In the previous section, we talked about the custom view engine, which can be known from the name of the view engine (ThemeableRazorViewEngine), and it realizes the automatic loading function of skin.

The view engine gets the current skin from IThemeContext and parses it and loads it.


Related articles: