Skip to content

Commit 9c14dbe

Browse files
committed
added kernel binding for IDockableUserControl
1 parent 1370e4f commit 9c14dbe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

RetailCoder.VBE/Root/RubberduckModule.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public override void Load()
133133
.WhenInjectedInto<ToDoExplorerCommand>()
134134
.InSingletonScope();
135135

136+
BindDockableToolwindows(assemblies);
136137
BindCommandsToCodeExplorer();
137138
ConfigureRubberduckMenu();
138139
ConfigureCodePaneContextMenu();
@@ -143,6 +144,15 @@ public override void Load()
143144
BindWindowsHooks();
144145
}
145146

147+
private void BindDockableToolwindows(IEnumerable<Assembly> assemblies)
148+
{
149+
Kernel.Bind(t => t.From(assemblies)
150+
.SelectAllClasses()
151+
.InheritedFrom<IDockableUserControl>()
152+
.BindToSelf()
153+
.Configure(binding => binding.InSingletonScope()));
154+
}
155+
146156
private void BindWindowsHooks()
147157
{
148158
Rebind<IAttachable>().To<TimerHook>()

0 commit comments

Comments
 (0)