Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d6f5107

Browse files
committed
Add xmldoc comments for TippingService
1 parent 600c9de commit d6f5107

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Windows;
3+
4+
namespace GitHub.Services
5+
{
6+
/// <summary>
7+
/// This service is a thin wrapper around <see cref="Microsoft.Internal.VisualStudio.Shell.Interop.IVsTippingService"/>.
8+
/// </summary>
9+
/// <remarks>
10+
/// The <see cref="IVsTippingService"/> interface is public, but contained within the 'Microsoft.VisualStudio.Shell.UI.Internal' assembly.
11+
/// To avoid a direct dependency on 'Microsoft.VisualStudio.Shell.UI.Internal', we use reflection to call this service.
12+
/// </remarks>
13+
public interface ITippingService
14+
{
15+
/// <summary>
16+
/// Show a call-out notification with the option to execute a command.
17+
/// </summary>
18+
/// <param name="calloutId">A unique id for the callout so that is can be permanently dismissed.</param>
19+
/// <param name="title">A clickable title for the callout.</param>
20+
/// <param name="message">A plain text message for that callout that will automatically wrap.</param>
21+
/// <param name="isPermanentlyDismissible">True for an option to never show again.</param>
22+
/// <param name="targetElement">A UI element for the callout to appear above which must be visible.</param>
23+
/// <param name="vsCommandGroupId">The group of the command to execute when title is clicked.</param>
24+
/// <param name="vsCommandId">The ID of the command to execute when title is clicked.</param>
25+
void RequestCalloutDisplay(Guid calloutId, string title, string message,
26+
bool isPermanentlyDismissible, FrameworkElement targetElement, Guid vsCommandGroupId, uint vsCommandId);
27+
}
28+
}

src/GitHub.Exports/Services/IVsTippingService.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/GitHub.Services.Vssdk/Services/TippingService.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010

1111
namespace GitHub.Services.Vssdk.Services
1212
{
13+
/// <summary>
14+
/// This service is a thin wrapper around <see cref="Microsoft.Internal.VisualStudio.Shell.Interop.IVsTippingService"/>.
15+
/// </summary>
16+
/// <remarks>
17+
/// The <see cref="IVsTippingService"/> interface is public, but contained within the 'Microsoft.VisualStudio.Shell.UI.Internal' assembly.
18+
/// To avoid a direct dependency on 'Microsoft.VisualStudio.Shell.UI.Internal', we use reflection to call this service.
19+
/// </remarks>
1320
public class TippingService : ITippingService
1421
{
1522
static readonly ILogger log = LogManager.ForContext<TippingService>();
@@ -24,6 +31,7 @@ public TippingService(IServiceProvider serviceProvider)
2431
this.serviceProvider = serviceProvider;
2532
}
2633

34+
/// <inheritdoc/>
2735
public void RequestCalloutDisplay(Guid calloutId, string title, string message,
2836
bool isPermanentlyDismissible, FrameworkElement targetElement,
2937
Guid vsCommandGroupId, uint vsCommandId)
@@ -35,7 +43,7 @@ public void RequestCalloutDisplay(Guid calloutId, string title, string message,
3543
point, vsCommandGroupId, vsCommandId);
3644
}
3745

38-
// Available on Visual Studio 2017
46+
// The option to pass a command option is only available on Visual Studio 2017+.
3947
void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message,
4048
bool isPermanentlyDismissible, FrameworkElement targetElement,
4149
Guid vsCommandGroupId, uint vsCommandId, object commandOption = null)

0 commit comments

Comments
 (0)