Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed inspections and quick fixes registration in Castle Windsor #3845

Merged
merged 1 commit into from
Mar 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions Rubberduck.Main/Root/RubberduckIoCInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ private void RegisterQuickFixes(IWindsorContainer container, Assembly[] assembli
container.Register(Classes.FromAssembly(assembly)
.IncludeNonPublicTypes()
.Where(type => type.IsBasedOn(typeof(IQuickFix)) && type.NotDisabledExperimental(_initialSettings))
.WithService.Base()
.WithService.Self()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Self() should work and is important at the places where specific quickfixes get injected.

.WithService.Select(new[] {typeof(IQuickFix)})
.LifestyleSingleton());
}
}
Expand All @@ -257,7 +256,7 @@ private void RegisterInspections(IWindsorContainer container, Assembly[] assembl
container.Register(Classes.FromAssembly(assembly)
.IncludeNonPublicTypes()
.Where(type => type.IsBasedOn(typeof(IInspection)) && type.NotDisabledExperimental(_initialSettings))
.WithService.Base()
.WithService.Select(new[] { typeof(IInspection) })
.LifestyleTransient());
}
}
Expand All @@ -269,7 +268,6 @@ private void RegisterParseTreeInspections(IWindsorContainer container, Assembly[
container.Register(Classes.FromAssembly(assembly)
.IncludeNonPublicTypes()
.Where(type => type.IsBasedOn(typeof(IParseTreeInspection)) && type.NotDisabledExperimental(_initialSettings))
.WithService.Base()
.WithService.Select(new[] { typeof(IInspection) })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be extended by typeof(IParseTreeInspection) to account for the removed Base().

.LifestyleTransient());
}
Expand Down