Merge pull request #938 from Flow-Launcher/UpdateXMLDoc

Update XML Docs
This commit is contained in:
Jeremy Wu 2022-01-01 23:13:01 +11:00 committed by GitHub
commit f6d8d3e9a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 10 deletions

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
@ -42,6 +42,7 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\Output\Debug\Flow.Launcher.Plugin.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

View file

@ -7,5 +7,10 @@ using System.Windows.Media;
namespace Flow.Launcher.Plugin
{
/// <summary>
/// Text with FontFamily specified
/// </summary>
/// <param name="FontFamily">Font Family of this Glyph</param>
/// <param name="Glyph">Text/Unicode of the Glyph</param>
public record GlyphInfo(string FontFamily, string Glyph);
}

View file

@ -10,11 +10,11 @@ namespace Flow.Launcher.Plugin
{
private string _pluginDirectory;
private string _icoPath;
/// <summary>
/// Provides the title of the result. This is always required.
/// The title of the result. This is always required.
/// </summary>
public string Title { get; set; }
@ -36,6 +36,11 @@ namespace Flow.Launcher.Plugin
/// </summary>
public string AutoCompleteText { get; set; }
/// <summary>
/// Image Displayed on the result
/// <value>Relative Path to the Image File</value>
/// <remarks>GlyphInfo is prioritized if not null</remarks>
/// </summary>
public string IcoPath
{
get { return _icoPath; }
@ -60,16 +65,23 @@ namespace Flow.Launcher.Plugin
public IconDelegate Icon;
/// <summary>
/// Information for Glyph Icon
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
/// </summary>
public GlyphInfo Glyph { get; init; }
public GlyphInfo Glyph { get; init; }
/// <summary>
/// return true to hide flowlauncher after select result
/// Delegate. An action to take in the form of a function call when the result has been selected
/// <returns>
/// true to hide flowlauncher after select result
/// </returns>
/// </summary>
public Func<ActionContext, bool> Action { get; set; }
/// <summary>
/// Priority of the current result
/// <value>default: 0</value>
/// </summary>
public int Score { get; set; }
/// <summary>
@ -81,7 +93,7 @@ namespace Flow.Launcher.Plugin
public IList<int> SubTitleHighlightData { get; set; }
/// <summary>
/// Only results that originQuery match with current query will be displayed in the panel
/// Query information associated with the result
/// </summary>
internal Query OriginQuery { get; set; }
@ -101,6 +113,7 @@ namespace Flow.Launcher.Plugin
}
}
/// <inheritdoc />
public override bool Equals(object obj)
{
var r = obj as Result;
@ -113,6 +126,7 @@ namespace Flow.Launcher.Plugin
return equality;
}
/// <inheritdoc />
public override int GetHashCode()
{
var hashcode = (Title?.GetHashCode() ?? 0) ^
@ -120,15 +134,17 @@ namespace Flow.Launcher.Plugin
return hashcode;
}
/// <inheritdoc />
public override string ToString()
{
return Title + SubTitle;
}
public Result() { }
/// <summary>
/// Additional data associate with this result
/// Additional data associated with this result
/// <example>
/// As external information for ContextMenu
/// </example>
/// </summary>
public object ContextData { get; set; }