Skip to content

Commit e2ca0bc

Browse files
Merge pull request #353 from reduckted/feature/fix-compiler-warnings
Fixed some compiler warnings
2 parents 4617e75 + 51415a4 commit e2ca0bc

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/toolkit/Community.VisualStudio.Toolkit.Shared/MEF/TokenOutliningTaggerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private static TagSpan<IStructureTag> CreateTag(SnapshotSpan span, string text,
5757
guideLineHorizontalAnchor: span.Start,
5858
type: PredefinedStructureTagTypes.Structural,
5959
isCollapsible: true,
60-
collapsedForm: tag.GetOutliningText(text),
60+
collapsedForm: tag.GetOutliningText!(text),
6161
collapsedHintForm: null);
6262

6363
return new TagSpan<IStructureTag>(span, structureTag);

src/toolkit/Community.VisualStudio.Toolkit.Shared/Notifications/RatingPrompt.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ private async Task IncrementAsync()
125125
/// </summary>
126126
public async Task PromptAsync()
127127
{
128+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
129+
128130
InfoBar? infoBar = await CreateInfoBarAsync();
129131

130132
if (infoBar == null)

src/toolkit/Community.VisualStudio.Toolkit.Shared/Windows/WindowFrame.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ public async Task<bool> IsOnScreenAsync()
231231
/// <returns><see langword="null"/> if the window isn't a document window.</returns>
232232
public async Task<DocumentView?> GetDocumentViewAsync()
233233
{
234+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
235+
234236
// Force the loading of a document that may be pending initialization.
235237
// See https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/delayed-document-loading
236238
_frame.GetProperty((int)__VSFPROPID.VSFPROPID_DocView, out _);

0 commit comments

Comments
 (0)