diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageBase.cs b/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageBase.cs index ea56d8302e..a646a962de 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageBase.cs @@ -292,6 +292,17 @@ public virtual string Href(string contentPath) return _urlHelper.Content(contentPath); } + /// + /// Creates a named content section in the page that can be invoked in a Layout page using + /// RenderSection or RenderSectionAsync + /// + /// The name of the section to create. + /// The delegate to execute when rendering the section. + /// This is a temporary placeholder method to support ASP.NET Core 2.0.0 editor code generation. + [EditorBrowsable(EditorBrowsableState.Never)] + protected void DefineSection(string name, Func section) + => DefineSection(name, () => section(null /* writer */)); + /// /// Creates a named content section in the page that can be invoked in a Layout page using /// RenderSection or RenderSectionAsync