Stop spurious VS "cannot override ExecuteAsync" errors even if you don't specify a base class

This commit is contained in:
Steve Sanderson 2018-01-18 00:07:54 +00:00
parent d1f96153d3
commit 3deab026c8
1 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,7 @@
*/
using System;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Mvc
{
@ -23,7 +24,13 @@ namespace Microsoft.AspNetCore.Mvc
namespace Microsoft.AspNetCore.Mvc.Razor
{
public class RazorPage<T> { }
public class RazorPage<T> {
// This needs to be defined otherwise the VS tooling complains that there's no ExecuteAsync method to override.
public virtual Task ExecuteAsync()
=> throw new NotImplementedException($"Blazor components do not implement {nameof(ExecuteAsync)}.");
}
namespace Internal
{