@@ -49,7 +49,7 @@ public class RubberduckModule : NinjectModule
49
49
private const int MsForms = 17 ;
50
50
private const int MsFormsControl = 18 ;
51
51
52
- private static readonly Logger _logger = LogManager . GetCurrentClassLogger ( ) ;
52
+ private static readonly Logger Logger = LogManager . GetCurrentClassLogger ( ) ;
53
53
54
54
public RubberduckModule ( VBE vbe , AddIn addin )
55
55
{
@@ -59,7 +59,7 @@ public RubberduckModule(VBE vbe, AddIn addin)
59
59
60
60
public override void Load ( )
61
61
{
62
- _logger . Debug ( "in RubberduckModule.Load()" ) ;
62
+ Logger . Debug ( "in RubberduckModule.Load()" ) ;
63
63
64
64
// bind VBE and AddIn dependencies to host-provided instances.
65
65
Bind < VBE > ( ) . ToConstant ( _vbe ) ;
@@ -149,7 +149,7 @@ public override void Load()
149
149
ConfigureProjectExplorerContextMenu ( ) ;
150
150
151
151
BindWindowsHooks ( ) ;
152
- _logger . Debug ( "completed RubberduckModule.Load()" ) ;
152
+ Logger . Debug ( "completed RubberduckModule.Load()" ) ;
153
153
}
154
154
155
155
private void BindWindowsHooks ( )
@@ -170,7 +170,7 @@ private void ApplyDefaultInterfacesConvention(IEnumerable<Assembly> assemblies)
170
170
// inspections & factories have their own binding rules
171
171
. Where ( type => ! type . Name . EndsWith ( "Factory" ) && ! type . Name . EndsWith ( "ConfigProvider" ) && ! type . GetInterfaces ( ) . Contains ( typeof ( IInspection ) ) )
172
172
. BindDefaultInterface ( )
173
- . Configure ( binding => binding . InThreadScope ( ) . Intercept ( ) . With < FatalExceptionInterceptor > ( ) ) ) ; // TransientScope wouldn't dispose disposables
173
+ . Configure ( binding => binding . InThreadScope ( ) ) ) ; // TransientScope wouldn't dispose disposables
174
174
}
175
175
176
176
// note: settings namespace classes are injected in singleton scope
@@ -308,7 +308,7 @@ private static int FindRubberduckMenuInsertionIndex(CommandBarControls controls,
308
308
private void BindCommandsToMenuItems ( )
309
309
{
310
310
var types = Assembly . GetExecutingAssembly ( ) . GetTypes ( )
311
- . Where ( type => type . IsClass && type . Namespace != null && type . Namespace . StartsWith ( typeof ( CommandBase ) . Namespace ?? String . Empty ) )
311
+ . Where ( type => type . IsClass && type . Namespace != null && type . Namespace . StartsWith ( typeof ( CommandBase ) . Namespace ?? string . Empty ) )
312
312
. ToList ( ) ;
313
313
314
314
// note: ICommand naming convention: [Foo]Command
@@ -330,10 +330,8 @@ private void BindCommandsToMenuItems()
330
330
binding . WhenInjectedInto < RubberduckHooks > ( ) . BindingConfiguration . Condition ;
331
331
332
332
binding . When ( request => whenCommandMenuItemCondition ( request ) || whenHooksCondition ( request ) )
333
- . InSingletonScope ( ) ;
334
-
335
- //Bind<ICommand>().To(command).WhenInjectedExactlyInto(item);
336
- //Bind<ICommand>().To(command);
333
+ . InSingletonScope ( )
334
+ . Intercept ( ) . With < FatalExceptionInterceptor > ( ) ;
337
335
}
338
336
}
339
337
catch ( InvalidOperationException )
0 commit comments