performance optimizations to avoid use of reflection ( thanks to @chlupac for this suggestion )

This commit is contained in:
Shaun Walker
2020-05-19 13:39:39 -04:00
parent b59e2533ea
commit 52b2c876a4
6 changed files with 35 additions and 31 deletions

View File

@ -66,8 +66,8 @@ namespace Oqtane.Repository
.Where(item => item.GetInterfaces().Contains(typeof(ITheme))).FirstOrDefault();
if (themetype != null)
{
var themeobject = Activator.CreateInstance(themetype);
theme = (Theme)themetype.GetProperty("Theme").GetValue(themeobject);
var themeobject = Activator.CreateInstance(themetype) as ITheme;
theme = themeobject.Theme;
}
else
{