Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 3ec3523

Browse files
Add application parts based on assembly candidates
1 parent 1477280 commit 3ec3523

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/AspNetCore/Contributions/MvcContribution.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.Extensions.Options;
88
using Rocket.Surgery.AspNetCore.Mvc.Filters;
99
using Microsoft.AspNetCore.Mvc.Razor;
10+
using Rocket.Surgery.Conventions.Reflection;
1011

1112
[assembly: Convention(typeof(AspNetCoreConvention))]
1213

@@ -26,6 +27,12 @@ public class AspNetCoreConvention : IServiceConvention
2627
/// TODO Edit XML Comment Template for Register
2728
public void Register(IServiceConventionContext context)
2829
{
30+
foreach (var item in context.AssemblyCandidateFinder.GetCandidateAssemblies("Rocket.Surgery.AspNetCore", "Microsoft.AspNetCore.Mvc"))
31+
{
32+
context.Services.AddMvcCore()
33+
.AddApplicationPart(item);
34+
}
35+
2936
context.Services.Configure<RazorViewEngineOptions>(options =>
3037
{
3138
// {0} - Action Name

0 commit comments

Comments
 (0)