modified ITheme interface (#344)

* upgrade to .NET Core 3.2 Preview 3 and fixes for issues created by #314

* Components based on Bootstrap4 for Sections and  TabStrip to increase productivity and promote uniformity in Module UIs

* rolled back change creating an Infrastructure.Interfaces namespace, modified IModule interface to be strongly typed

* modified ITheme interface
This commit is contained in:
Shaun Walker
2020-04-05 15:31:54 -04:00
committed by GitHub
parent 02fde9cec3
commit 5a6f939a98
7 changed files with 48 additions and 70 deletions

View File

@ -48,41 +48,22 @@ namespace Oqtane.Repository
if (themetype != null)
{
var themeobject = Activator.CreateInstance(themetype);
Dictionary<string, string> properties = (Dictionary<string, string>)themetype.GetProperty("Properties").GetValue(themeobject);
theme = new Theme
{
ThemeName = @namespace,
Name = GetProperty(properties, "Name"),
Version = GetProperty(properties, "Version"),
Owner = GetProperty(properties, "Owner"),
Url = GetProperty(properties, "Url"),
Contact = GetProperty(properties, "Contact"),
License = GetProperty(properties, "License"),
Dependencies = GetProperty(properties, "Dependencies"),
ThemeControls = "",
PaneLayouts = "",
ContainerControls = "",
AssemblyName = assembly.FullName.Split(",")[0]
};
theme = (Theme)themetype.GetProperty("Theme").GetValue(themeobject);
}
else
{
theme = new Theme
{
ThemeName = @namespace,
Name = themeControlType.Name,
Version = new Version(1, 0, 0).ToString(),
Owner = "",
Url = "",
Contact = "",
License = "",
Dependencies = "",
ThemeControls = "",
PaneLayouts = "",
ContainerControls = "",
AssemblyName = assembly.FullName.Split(",")[0]
Version = new Version(1, 0, 0).ToString()
};
}
// set internal properties
theme.ThemeName = @namespace;
theme.ThemeControls = "";
theme.PaneLayouts = "";
theme.ContainerControls = "";
theme.AssemblyName = assembly.FullName.Split(",")[0];
themes.Add(theme);
index = themes.FindIndex(item => item.ThemeName == @namespace);
}