From 0a9eb09d7e869ded6ea7530425fcf006f3fa1c98 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Feb 2024 11:40:54 -0500 Subject: [PATCH] Add DeepCopy method --- Flow.Launcher.Plugin/Result.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index bfb0b0411..fc6c5d185 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -183,6 +183,31 @@ namespace Flow.Launcher.Plugin return Title + SubTitle + Score; } + /// + /// Clones the current result + /// + public Result Clone() + { + return new Result + { + Title = Title, + SubTitle = SubTitle, + ActionKeywordAssigned = ActionKeywordAssigned, + CopyText = CopyText, + AutoCompleteText = AutoCompleteText, + IcoPath = IcoPath, + RoundedIcon = RoundedIcon, + Icon = Icon, + Glyph = Glyph, + Action = Action, + AsyncAction = AsyncAction, + Score = Score, + TitleHighlightData = TitleHighlightData, + OriginQuery = OriginQuery, + PluginDirectory = PluginDirectory + }; + } + /// /// Additional data associated with this result ///