Skip to content

Commit f9f03c7

Browse files
committed
string interpolation
1 parent 77bd875 commit f9f03c7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Main.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void Init(PluginInitContext context)
3737
hasOneNote = false;
3838
return;
3939
}
40-
40+
4141
notebookInfo = new OneNoteItemInfo("NotebookIcons", "notebook.png", context);
4242
sectionInfo = new OneNoteItemInfo("SectionIcons", "section.png", context);
4343
}
@@ -61,8 +61,8 @@ public List<Result> Query(Query query)
6161
results.Add(new Result
6262
{
6363
Title = "Search OneNote pages",
64-
SubTitle = "Type \"" + structureKeyword + "\" to search by notebook structure or select this option",
65-
AutoCompleteText = context.CurrentPluginMetadata.ActionKeyword + " " + structureKeyword,
64+
SubTitle = $"Type \"{structureKeyword}\" to search by notebook structure or select this option",
65+
AutoCompleteText = $"{context.CurrentPluginMetadata.ActionKeyword} {structureKeyword}",
6666
IcoPath = logoIconPath,
6767
Score = 2000,
6868
Action = c =>
@@ -74,13 +74,13 @@ public List<Result> Query(Query query)
7474
results.Add(new Result
7575
{
7676
Title = "See recent pages",
77-
SubTitle = "Type \"" + recentKeyword + "\" to see last modified pages or select this option",
78-
AutoCompleteText = context.CurrentPluginMetadata.ActionKeyword + " " + recentKeyword,
77+
SubTitle = $"Type \"{recentKeyword}\" to see last modified pages or select this option",
78+
AutoCompleteText = $"{context.CurrentPluginMetadata.ActionKeyword} {recentKeyword}",
7979
IcoPath = recentIconPath,
8080
Score = -1000,
8181
Action = c =>
8282
{
83-
context.API.ChangeQuery(context.CurrentPluginMetadata.ActionKeyword + " " + recentKeyword);
83+
context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeyword} {recentKeyword}");
8484
return false;
8585
},
8686
});
@@ -293,7 +293,7 @@ private Result CreatePageResult(IOneNotePage page, IOneNoteSection section, IOne
293293
{
294294
Title = page.Name,
295295
SubTitle = path,
296-
TitleToolTip = "Created: " + page.DateTime + "\nLast Modified: " + page.LastModified,
296+
TitleToolTip = $"Created: {page.DateTime}\nLast Modified: {page.LastModified}",
297297
SubTitleToolTip = path,
298298
IcoPath = logoIconPath,
299299
ContextData = page,

0 commit comments

Comments
 (0)