clarify documentation and parameter names
This commit is contained in:
parent
6126624631
commit
ee4068d671
@ -25,11 +25,12 @@ namespace Oqtane.Services
|
|||||||
Task<Theme> GetThemeAsync(int themeId, int siteId);
|
Task<Theme> GetThemeAsync(int themeId, int siteId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a theme <see cref="ThemeControl"/>s containing a theme control type
|
/// Returns a theme <see cref="ThemeControl"/>s containing a specific theme control type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="themes"></param>
|
/// <param name="themes"></param>
|
||||||
|
/// <param name="themeControlType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Theme GetTheme(List<Theme> themes, string themeType);
|
Theme GetTheme(List<Theme> themes, string themeControlType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of <see cref="ThemeControl"/>s from the given themes
|
/// Returns a list of <see cref="ThemeControl"/>s from the given themes
|
||||||
@ -39,19 +40,20 @@ namespace Oqtane.Services
|
|||||||
List<ThemeControl> GetThemeControls(List<Theme> themes);
|
List<ThemeControl> GetThemeControls(List<Theme> themes);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of <see cref="ThemeControl"/>s from the given themes with a matching theme type
|
/// Returns a list of <see cref="ThemeControl"/>s for a theme containing a specific theme control type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="themes"></param>
|
/// <param name="themes"></param>
|
||||||
|
/// <param name="themeControlType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<ThemeControl> GetThemeControls(List<Theme> themes, string themeType);
|
List<ThemeControl> GetThemeControls(List<Theme> themes, string themeControlType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of containers (<see cref="ThemeControl"/>) from the given themes with a matching theme type
|
/// Returns a list of containers (<see cref="ThemeControl"/>) for a theme containing a specific theme control type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="themes"></param>
|
/// <param name="themes"></param>
|
||||||
/// <param name="themeName"></param>
|
/// <param name="themeControlType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeType);
|
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeControlType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a existing theem
|
/// Updates a existing theem
|
||||||
|
@ -26,9 +26,9 @@ namespace Oqtane.Services
|
|||||||
return await GetJsonAsync<Theme>($"{ApiUrl}/{themeId}?siteid={siteId}");
|
return await GetJsonAsync<Theme>($"{ApiUrl}/{themeId}?siteid={siteId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Theme GetTheme(List<Theme> themes, string themeType)
|
public Theme GetTheme(List<Theme> themes, string themeControlType)
|
||||||
{
|
{
|
||||||
return themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == themeType));
|
return themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == themeControlType));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ThemeControl> GetThemeControls(List<Theme> themes)
|
public List<ThemeControl> GetThemeControls(List<Theme> themes)
|
||||||
@ -36,15 +36,15 @@ namespace Oqtane.Services
|
|||||||
return themes.SelectMany(item => item.Themes).OrderBy(item => item.Name).ToList();
|
return themes.SelectMany(item => item.Themes).OrderBy(item => item.Name).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ThemeControl> GetThemeControls(List<Theme> themes, string themeType)
|
public List<ThemeControl> GetThemeControls(List<Theme> themes, string themeControlType)
|
||||||
{
|
{
|
||||||
return GetTheme(themes, themeType)?.Themes.OrderBy(item => item.Name).ToList();
|
return GetTheme(themes, themeControlType)?.Themes.OrderBy(item => item.Name).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<ThemeControl> GetContainerControls(List<Theme> themes, string themeType)
|
public List<ThemeControl> GetContainerControls(List<Theme> themes, string themeControlType)
|
||||||
{
|
{
|
||||||
return GetTheme(themes, themeType)?.Containers.OrderBy(item => item.Name).ToList();
|
return GetTheme(themes, themeControlType)?.Containers.OrderBy(item => item.Name).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UpdateThemeAsync(Theme theme)
|
public async Task UpdateThemeAsync(Theme theme)
|
||||||
|
Reference in New Issue
Block a user