Document the App Launcher Daemon

This commit is contained in:
Michael 2017-04-16 08:12:30 -04:00
parent 664645986d
commit 112c05cb5e

View file

@ -34,8 +34,17 @@ using ShiftOS.Objects.ShiftFS;
namespace ShiftOS.Engine
{
/// <summary>
/// Provides functionality for pulling data about the App Launcher.
/// </summary>
public static class AppLauncherDaemon
{
/// <summary>
/// Extension method that allows you to determine if a list of <see cref="AssemblyName"/>s contains a given name.
/// </summary>
/// <param name="asms">The list of assembly names</param>
/// <param name="name">The name to look for.</param>
/// <returns>Whether or not the name was found in the list.</returns>
public static bool Contains(this AssemblyName[] asms, string name)
{
foreach(var asm in asms)
@ -46,6 +55,10 @@ namespace ShiftOS.Engine
return false;
}
/// <summary>
/// Pulls a list of all available App Launcher items.
/// </summary>
/// <returns>A <see cref="List{LauncherItem}"/> containing all available App Launcher items.</returns>
public static List<LauncherItem> Available()
{
List<LauncherItem> win = new List<LauncherItem>();
@ -111,20 +124,39 @@ namespace ShiftOS.Engine
}
/// <summary>
/// Provides a data object for app launcher items
/// </summary>
public class LauncherItem
{
/// <summary>
/// Display data including icons, names, and the category of the item.
/// </summary>
public LauncherAttribute DisplayData { get; internal set; }
/// <summary>
/// A .NET <see cref="Type"/> that is associated with this item.
/// </summary>
public Type LaunchType { get; internal set; }
}
/// <summary>
/// Provides the ability to run Lua scripts from the App Launcher.
/// </summary>
public class LuaLauncherItem : LauncherItem
{
/// <summary>
/// Creates a new instance of the <see cref="LuaLauncherItem"/>.
/// </summary>
/// <param name="file">A script file to run when the item is activated.</param>
public LuaLauncherItem(string file)
{
LaunchPath = file;
}
/// <summary>
/// Gets or sets the launch path of this App Launcher item.
/// </summary>
public string LaunchPath { get; private set; }
}
}