Skip to content

Commit 74b7bd9

Browse files
committed
Fix bug in control macro reported in #99
1 parent e016f84 commit 74b7bd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/ExcelDna.IntelliSense/IntelliSenseServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,9 @@ static RegistrationInfo GetHighestPublishedRegistration()
500500

501501
static void RegisterControlMacro()
502502
{
503-
var method = typeof(IntelliSenseServer).GetMethod(nameof(IntelliSenseServerControl), BindingFlags.Static | BindingFlags.NonPublic);
503+
Func<object, object> delControl = control => IntelliSenseServerControl(control);
504504
var name = RegistrationInfo.GetControlMacroName(_serverId);
505-
ExcelIntegration.RegisterMethods(new List<MethodInfo> { method },
505+
ExcelIntegration.RegisterDelegates(new List<Delegate> { delControl },
506506
new List<object> { new ExcelCommandAttribute { Name = name } }, // Macros in .xlls are always hidden
507507
new List<List<object>> { new List<object> { null } });
508508
// No Unregistration - that will happen automatically (and is only needed) when we are unloaded.

0 commit comments

Comments
 (0)