@@ -36,13 +36,14 @@ public Query(string rawQuery, string search, string[] terms, string[] searchTerm
3636 /// <summary>
3737 /// Search part of a query.
3838 /// This will not include action keyword if exclusive plugin gets it, otherwise it should be same as RawQuery.
39- /// Since we allow user to switch a exclusive plugin to generic plugin,
39+ /// Since we allow user to switch a exclusive plugin to generic plugin,
4040 /// so this property will always give you the "real" query part of the query
4141 /// </summary>
4242 public string Search { get ; internal init ; }
4343
4444 /// <summary>
4545 /// The search string split into a string array.
46+ /// Does not include the <see cref="ActionKeyword"/>.
4647 /// </summary>
4748 public string [ ] SearchTerms { get ; init ; }
4849
@@ -59,6 +60,7 @@ public Query(string rawQuery, string search, string[] terms, string[] searchTerm
5960
6061 [ Obsolete ( "Typo" ) ]
6162 public const string TermSeperater = TermSeparator ;
63+
6264 /// <summary>
6365 /// User can set multiple action keywords seperated by ';'
6466 /// </summary>
@@ -69,15 +71,22 @@ public Query(string rawQuery, string search, string[] terms, string[] searchTerm
6971
7072
7173 /// <summary>
72- /// '*' is used for System Plugin
74+ /// Wildcard action keyword. Plugins using this value will be queried on every search.
7375 /// </summary>
7476 public const string GlobalPluginWildcardSign = "*" ;
7577
78+ /// <summary>
79+ /// The action keyword part of this query.
80+ /// For global plugins this value will be empty.
81+ /// </summary>
7682 public string ActionKeyword { get ; init ; }
7783
7884 /// <summary>
79- /// Return first search split by space if it has
85+ /// Splits <see cref="SearchTerms"/> by spaces and returns the first item.
8086 /// </summary>
87+ /// <remarks>
88+ /// returns an empty string when <see cref="SearchTerms"/> does not have enough items.
89+ /// </remarks>
8190 public string FirstSearch => SplitSearch ( 0 ) ;
8291
8392 private string _secondToEndSearch ;
@@ -88,20 +97,27 @@ public Query(string rawQuery, string search, string[] terms, string[] searchTerm
8897 public string SecondToEndSearch => SearchTerms . Length > 1 ? ( _secondToEndSearch ??= string . Join ( ' ' , SearchTerms [ 1 ..] ) ) : "" ;
8998
9099 /// <summary>
91- /// Return second search split by space if it has
100+ /// Splits <see cref="SearchTerms"/> by spaces and returns the second item.
92101 /// </summary>
102+ /// <remarks>
103+ /// returns an empty string when <see cref="SearchTerms"/> does not have enough items.
104+ /// </remarks>
93105 public string SecondSearch => SplitSearch ( 1 ) ;
94106
95107 /// <summary>
96- /// Return third search split by space if it has
108+ /// Splits <see cref="SearchTerms"/> by spaces and returns the third item.
97109 /// </summary>
110+ /// <remarks>
111+ /// returns an empty string when <see cref="SearchTerms"/> does not have enough items.
112+ /// </remarks>
98113 public string ThirdSearch => SplitSearch ( 2 ) ;
99114
100115 private string SplitSearch ( int index )
101116 {
102117 return index < SearchTerms . Length ? SearchTerms [ index ] : string . Empty ;
103118 }
104119
120+ /// <inheritdoc />
105121 public override string ToString ( ) => RawQuery ;
106122 }
107123}
0 commit comments