Skip to content

Commit 99f7650

Browse files
Move Invoke method in BaseInheritViewComponent and make it virtual
1 parent 61116a4 commit 99f7650

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/MyTested.AspNetCore.Mvc.Test.Setups/ViewComponents/InheritViewComponent.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
[ResponseCache]
77
public class InheritViewComponent : BaseInheritViewComponent
88
{
9-
public IViewComponentResult Invoke() => this.View();
109
}
1110

1211
[AllowAnonymous]
1312
[ValidateAntiForgeryToken]
14-
public class BaseInheritViewComponent : ViewComponent
13+
public abstract class BaseInheritViewComponent : ViewComponent
1514
{
16-
15+
public virtual IViewComponentResult Invoke() => this.View();
1716
}
1817
}

0 commit comments

Comments
 (0)