|
1 | 1 | using System; |
2 | 2 | using System.Linq; |
3 | | -using System.Reflection; |
4 | 3 | using System.Runtime.InteropServices; |
5 | 4 | using System.Windows; |
6 | 5 | using GitHub.Logging; |
@@ -44,23 +43,6 @@ public void RequestCalloutDisplay(Guid calloutId, string title, string message, |
44 | 43 | point, vsCommandGroupId, vsCommandId); |
45 | 44 | } |
46 | 45 |
|
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 | | - |
64 | 46 | // Available on Visual Studio 2015 |
65 | 47 | void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message, bool isPermanentlyDismissible, |
66 | 48 | Microsoft.VisualStudio.OLE.Interop.POINT anchor, Guid vsCommandGroupId, uint vsCommandId) |
@@ -96,8 +78,5 @@ void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string m |
96 | 78 | [ComImport] |
97 | 79 | public interface SVsTippingService |
98 | 80 | { |
99 | | - void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string message, |
100 | | - bool isPermanentlyDismissible, FrameworkElement targetElement, |
101 | | - Guid vsCommandGroupId, uint vsCommandId, object commandOption = null); |
102 | 81 | } |
103 | 82 | } |
0 commit comments