Merge branch 'rel/2.0.0-preview1' into dev

This commit is contained in:
N. Taylor Mullen 2017-04-26 15:13:39 -07:00
commit e8c102adfb
1 changed files with 11 additions and 0 deletions

View File

@ -292,6 +292,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
return _urlHelper.Content(contentPath);
}
/// <summary>
/// Creates a named content section in the page that can be invoked in a Layout page using
/// <c>RenderSection</c> or <c>RenderSectionAsync</c>
/// </summary>
/// <param name="name">The name of the section to create.</param>
/// <param name="section">The delegate to execute when rendering the section.</param>
/// <remarks>This is a temporary placeholder method to support ASP.NET Core 2.0.0 editor code generation.</remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
protected void DefineSection(string name, Func<object, Task> section)
=> DefineSection(name, () => section(null /* writer */));
/// <summary>
/// Creates a named content section in the page that can be invoked in a Layout page using
/// <c>RenderSection</c> or <c>RenderSectionAsync</c>