added uninstall support for modules
This commit is contained in:
@ -9,7 +9,24 @@ namespace Oqtane.Repository
|
||||
{
|
||||
public class ThemeRepository : IThemeRepository
|
||||
{
|
||||
private List<Theme> _themes; // lazy load
|
||||
|
||||
public IEnumerable<Theme> GetThemes()
|
||||
{
|
||||
return LoadThemes();
|
||||
}
|
||||
|
||||
private List<Theme> LoadThemes()
|
||||
{
|
||||
if (_themes == null)
|
||||
{
|
||||
// get themes
|
||||
_themes = LoadThemesFromAssemblies();
|
||||
}
|
||||
return _themes;
|
||||
}
|
||||
|
||||
private List<Theme> LoadThemesFromAssemblies()
|
||||
{
|
||||
List<Theme> themes = new List<Theme>();
|
||||
|
||||
@ -103,20 +120,5 @@ namespace Oqtane.Repository
|
||||
}
|
||||
return themes;
|
||||
}
|
||||
|
||||
private string GetProperty(Dictionary<string, string> properties, string key)
|
||||
{
|
||||
string value = "";
|
||||
if (properties.ContainsKey(key))
|
||||
{
|
||||
value = properties[key];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public IEnumerable<Theme> GetThemes()
|
||||
{
|
||||
return LoadThemes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user