File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ private void ApplyAbstractFactoryConvention(IEnumerable<Assembly> assemblies)
95
95
{
96
96
_kernel . Bind ( t => t . From ( assemblies )
97
97
. SelectAllInterfaces ( )
98
- . Where ( type => type . Name . EndsWith ( "Factory" ) )
98
+ . Where ( type => type . Name . EndsWith ( "Factory" ) )
99
99
. BindToFactory ( )
100
100
. Configure ( binding => binding . InSingletonScope ( ) ) ) ;
101
101
}
Original file line number Diff line number Diff line change 2
2
using Ninject ;
3
3
using Ninject . Modules ;
4
4
using Rubberduck . Settings ;
5
+ using Rubberduck . SourceControl ;
5
6
6
7
namespace Rubberduck . UI . SourceControl
7
8
{
@@ -31,12 +32,11 @@ public override void Load()
31
32
Bind < IMergeView > ( ) . To < MergeForm > ( ) ;
32
33
33
34
//factories
34
- // todo: check on note below
35
- // ninject is complaining about also having a SourceControlProviderFactoryProxy and a FolderBrowserFactoryProxy
36
- // I'm unsure about commenting these out. I have a feeling that it's not the "right thing", but everything seems to work.
37
35
38
- //Bind<ISourceControlProviderFactory>().To<SourceControlProviderFactory>();
39
- //Bind<IFolderBrowserFactory>().To<DialogFactory>();
36
+ // note: RubberduckModule sets up factory proxies by convention.
37
+ // Replace these factory proxies with our existing concrete implementations.
38
+ Rebind < ISourceControlProviderFactory > ( ) . To < SourceControlProviderFactory > ( ) ;
39
+ Rebind < IFolderBrowserFactory > ( ) . To < DialogFactory > ( ) ;
40
40
}
41
41
}
42
42
}
You can’t perform that action at this time.
0 commit comments