@@ -50,9 +50,9 @@ void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string m
5050 {
5151 var tippingService = serviceProvider . GetService ( typeof ( SVsTippingService ) ) ;
5252 Assumes . Present ( tippingService ) ;
53- var currentMethod = MethodBase . GetCurrentMethod ( ) ;
54- var parameterTypes = currentMethod . GetParameters ( ) . Select ( p => p . ParameterType ) . ToArray ( ) ;
55- var method = tippingService . GetType ( ) . GetMethod ( currentMethod . Name , parameterTypes ) ;
53+ var parameterTypes = new Type [ ] { typeof ( Guid ) , typeof ( Guid ) , typeof ( string ) , typeof ( string ) ,
54+ typeof ( bool ) , typeof ( FrameworkElement ) , typeof ( Guid ) , typeof ( uint ) , typeof ( object ) } ;
55+ var method = tippingService . GetType ( ) . GetMethod ( "RequestCalloutDisplay" , parameterTypes ) ;
5656 var arguments = new object [ ] { clientId , calloutId , title , message , isPermanentlyDismissible , targetElement ,
5757 vsCommandGroupId , vsCommandId , commandOption } ;
5858 method . Invoke ( tippingService , arguments ) ;
@@ -70,13 +70,13 @@ void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string m
7070 }
7171
7272 Assumes . Present ( tippingService ) ;
73- var currentMethod = MethodBase . GetCurrentMethod ( ) ;
74- var parameterTypes = currentMethod . GetParameters ( ) . Select ( p => p . ParameterType ) . ToArray ( ) ;
73+ var parameterTypes = new Type [ ] { typeof ( Guid ) , typeof ( Guid ) , typeof ( string ) , typeof ( string ) , typeof ( bool ) ,
74+ typeof ( Microsoft . VisualStudio . OLE . Interop . POINT ) , typeof ( Guid ) , typeof ( uint ) } ;
7575 var tippingServiceType = tippingService . GetType ( ) ;
76- var method = tippingServiceType . GetMethod ( currentMethod . Name , parameterTypes ) ;
76+ var method = tippingServiceType . GetMethod ( "RequestCalloutDisplay" , parameterTypes ) ;
7777 if ( method == null )
7878 {
79- log . Error ( "Couldn't find method on {Type} with parameters like {Method }" , tippingServiceType , currentMethod ) ;
79+ log . Error ( "Couldn't find method on {Type} with parameters {Parameters }" , tippingServiceType , parameterTypes ) ;
8080 return ;
8181 }
8282
@@ -92,5 +92,8 @@ void RequestCalloutDisplay(Guid clientId, Guid calloutId, string title, string m
9292 [ ComImport ]
9393 public interface SVsTippingService
9494 {
95+ void RequestCalloutDisplay ( Guid clientId , Guid calloutId , string title , string message ,
96+ bool isPermanentlyDismissible , FrameworkElement targetElement ,
97+ Guid vsCommandGroupId , uint vsCommandId , object commandOption = null ) ;
9598 }
9699}
0 commit comments