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

View file

@ -7,5 +7,10 @@ using System.Windows.Media;
namespace Flow.Launcher.Plugin 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); public record GlyphInfo(string FontFamily, string Glyph);
} }

View file

@ -10,11 +10,11 @@ namespace Flow.Launcher.Plugin
{ {
private string _pluginDirectory; private string _pluginDirectory;
private string _icoPath; private string _icoPath;
/// <summary> /// <summary>
/// Provides the title of the result. This is always required. /// The title of the result. This is always required.
/// </summary> /// </summary>
public string Title { get; set; } public string Title { get; set; }
@ -36,6 +36,11 @@ namespace Flow.Launcher.Plugin
/// </summary> /// </summary>
public string AutoCompleteText { get; set; } 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 public string IcoPath
{ {
get { return _icoPath; } get { return _icoPath; }
@ -60,16 +65,23 @@ namespace Flow.Launcher.Plugin
public IconDelegate Icon; public IconDelegate Icon;
/// <summary> /// <summary>
/// Information for Glyph Icon /// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
/// </summary> /// </summary>
public GlyphInfo Glyph { get; init; } public GlyphInfo Glyph { get; init; }
/// <summary> /// <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> /// </summary>
public Func<ActionContext, bool> Action { get; set; } public Func<ActionContext, bool> Action { get; set; }
/// <summary>
/// Priority of the current result
/// <value>default: 0</value>
/// </summary>
public int Score { get; set; } public int Score { get; set; }
/// <summary> /// <summary>
@ -81,7 +93,7 @@ namespace Flow.Launcher.Plugin
public IList<int> SubTitleHighlightData { get; set; } public IList<int> SubTitleHighlightData { get; set; }
/// <summary> /// <summary>
/// Only results that originQuery match with current query will be displayed in the panel /// Query information associated with the result
/// </summary> /// </summary>
internal Query OriginQuery { get; set; } internal Query OriginQuery { get; set; }
@ -101,6 +113,7 @@ namespace Flow.Launcher.Plugin
} }
} }
/// <inheritdoc />
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
var r = obj as Result; var r = obj as Result;
@ -113,6 +126,7 @@ namespace Flow.Launcher.Plugin
return equality; return equality;
} }
/// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
var hashcode = (Title?.GetHashCode() ?? 0) ^ var hashcode = (Title?.GetHashCode() ?? 0) ^
@ -120,15 +134,17 @@ namespace Flow.Launcher.Plugin
return hashcode; return hashcode;
} }
/// <inheritdoc />
public override string ToString() public override string ToString()
{ {
return Title + SubTitle; return Title + SubTitle;
} }
public Result() { }
/// <summary> /// <summary>
/// Additional data associate with this result /// Additional data associated with this result
/// <example>
/// As external information for ContextMenu
/// </example>
/// </summary> /// </summary>
public object ContextData { get; set; } public object ContextData { get; set; }