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

Adding RenderSectionAsync to support async sections #1228

Closed
wants to merge 3 commits into from

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Oct 3, 2014

Fixes #845

@pranavkm pranavkm changed the title Changing RenderSection to RenderSectionAsync [Design] Changing RenderSection to RenderSectionAsync Oct 4, 2014
@pranavkm pranavkm changed the title [Design] Changing RenderSection to RenderSectionAsync Changing RenderSection to RenderSectionAsync Oct 8, 2014
@pranavkm pranavkm changed the title Changing RenderSection to RenderSectionAsync Adding RenderSectionAsync to support async sections Oct 8, 2014
/// <returns>A <see cref="Task{TResult}"/> that represents the results of rendering.</returns>
/// <exception cref="InvalidOperationException">if <paramref name="required"/> is <c>true</c> and the section
/// was not registered using the <c>@section</c> in the Razor page.</exception>
public async Task<object> RenderSectionAsync([NotNull] string name, bool required)

Choose a reason for hiding this comment

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

Why do we have to use object here instead of the actual type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporary for beta. We need to return something for the rendering to succeed. Post beta, we need to address aspnet/Razor#85 so that this can return an AsyncHelperResult which gets evaluated by WriteAsync

Choose a reason for hiding this comment

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

Gotcha

@pranavkm
Copy link
Contributor Author

Updated to use HtmlString

@NTaylorMullen
Copy link

:shipit:

@pranavkm pranavkm closed this Oct 14, 2014
@pranavkm pranavkm deleted the AsyncSections branch October 14, 2014 00:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants