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

Commit 436c3c6

Browse files
committed
Remove unused code
The RequestCalloutDisplay method that takes commandOption is only available on VS 2017+.
1 parent 01abce3 commit 436c3c6

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Linq;
3-
using System.Reflection;
43
using System.Runtime.InteropServices;
54
using System.Windows;
65
using GitHub.Logging;
@@ -44,23 +43,6 @@ public void RequestCalloutDisplay(Guid calloutId, string title, string message,
4443
point, vsCommandGroupId, vsCommandId);
4544
}
4645

47-
// The option to pass a command option is only available on Visual Studio 2017+.
48-
void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message,
49-
bool isPermanentlyDismissible, FrameworkElement targetElement,
50-
Guid vsCommandGroupId, uint vsCommandId, object commandOption = null)
51-
{
52-
var tippingService = serviceProvider.GetService(typeof(SVsTippingService));
53-
Assumes.Present(tippingService);
54-
var parameterTypes = new Type[] { typeof(Guid), typeof(Guid), typeof(string), typeof(string),
55-
typeof(bool), typeof(FrameworkElement), typeof(Guid), typeof(uint), typeof(object) };
56-
var method = tippingService.GetType().GetInterfaces()
57-
.Where(i => i.Name == "IVsTippingService")
58-
.FirstOrDefault()?.GetMethod("RequestCalloutDisplay", parameterTypes);
59-
var arguments = new object[] { clientId, calloutId, title, message, isPermanentlyDismissible, targetElement,
60-
vsCommandGroupId, vsCommandId, commandOption };
61-
method.Invoke(tippingService, arguments);
62-
}
63-
6446
// Available on Visual Studio 2015
6547
void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message, bool isPermanentlyDismissible,
6648
Microsoft.VisualStudio.OLE.Interop.POINT anchor, Guid vsCommandGroupId, uint vsCommandId)
@@ -96,8 +78,5 @@ void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string m
9678
[ComImport]
9779
public interface SVsTippingService
9880
{
99-
void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message,
100-
bool isPermanentlyDismissible, FrameworkElement targetElement,
101-
Guid vsCommandGroupId, uint vsCommandId, object commandOption = null);
10281
}
10382
}

0 commit comments

Comments
 (0)