-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9608 from drewnoakes/close-info-bars-on-project-c…
…lose Close info bars when associated project(s) unload
- Loading branch information
Showing
11 changed files
with
249 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
appsettings | ||
args | ||
async | ||
asynch | ||
awaiter | ||
blazor | ||
boolean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...sualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBarService/IInfoBarService.cs
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
...oft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBarService/InfoBarUI.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBarService/InfoBarUIKind.cs
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
...jectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBarService/VsInfoBarService.InfoBarEntry.cs
This file was deleted.
Oops, something went wrong.
131 changes: 0 additions & 131 deletions
131
...ualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBarService/VsInfoBarService.cs
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...oft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UI/InfoBars/IInfoBarService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. | ||
|
||
using Microsoft.VisualStudio.Imaging.Interop; | ||
|
||
namespace Microsoft.VisualStudio.ProjectSystem.VS.UI.InfoBars; | ||
|
||
/// <summary> | ||
/// Displays messages in the information bar attached to Visual Studio's main window. | ||
/// </summary> | ||
[ProjectSystemContract(ProjectSystemContractScope.UnconfiguredProject, ProjectSystemContractProvider.System)] | ||
internal interface IInfoBarService | ||
{ | ||
/// <summary> | ||
/// Shows an information bar with the specified message, image and UI, replacing an existing one | ||
/// with the same message if there is one. | ||
/// </summary> | ||
Task ShowInfoBarAsync(string message, ImageMoniker image, CancellationToken cancellationToken, params ImmutableArray<InfoBarAction> actions); | ||
} | ||
|
||
/// <summary> | ||
/// Represents an action that can be performed via info bars, such as a button or hyperlink. | ||
/// </summary> | ||
/// <param name="Title">Text to show in the button or hyperlink.</param> | ||
/// <param name="Kind">Whether to show the action as a button or hyperlink.</param> | ||
/// <param name="Callback">The callback to invoke when the user clicks this action.</param> | ||
/// <param name="CloseAfterAction">Whether this action should also close the info bar after invoking the callback.</param> | ||
internal sealed record class InfoBarAction(string Title, InfoBarActionKind Kind, Action Callback, bool CloseAfterAction); | ||
|
||
/// <summary> | ||
/// The presentation style of an <see cref="InfoBarAction"/>. | ||
/// </summary> | ||
internal enum InfoBarActionKind | ||
{ | ||
Button, | ||
Hyperlink | ||
} |
Oops, something went wrong.