SearchString.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 // Code forked from Betsegaw Tadele's https://github.com/betsegaw/windowwalker/ 6 namespace Microsoft.Plugin.WindowWalker.Components 7 { 8 /// <summary> 9 /// A class to represent a search string 10 /// </summary> 11 /// <remarks>Class was added in order to be able to attach various context data to 12 /// a search string</remarks> 13 internal class SearchString 14 { 15 /// <summary> 16 /// Gets where is the search string coming from (is it a shortcut 17 /// or direct string, etc...) 18 /// </summary> 19 internal SearchResult.SearchType SearchType 20 { 21 get; 22 private set; 23 } 24 25 /// <summary> 26 /// Gets the actual text we are searching for 27 /// </summary> 28 internal string SearchText 29 { 30 get; 31 private set; 32 } 33 34 /// <summary> 35 /// Initializes a new instance of the <see cref="SearchString"/> class. 36 /// Constructor 37 /// </summary> 38 /// <param name="searchText">text from search</param> 39 /// <param name="searchType">type of search</param> 40 internal SearchString(string searchText, SearchResult.SearchType searchType) 41 { 42 SearchText = searchText; 43 SearchType = searchType; 44 } 45 } 46 }