Skip to content

Improvements to MVC EventData typess #12323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 87 additions & 87 deletions src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs

Large diffs are not rendered by default.

178 changes: 89 additions & 89 deletions src/Mvc/Mvc.Core/src/Diagnostics/MvcDiagnostics.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ static async Task Logged(ControllerActionInvoker invoker)
IActionResult result = null;
try
{
diagnosticListener.BeforeActionMethod(
diagnosticListener.BeforeControllerActionMethod(
controllerContext,
arguments,
controller);
Expand All @@ -440,7 +440,7 @@ static async Task Logged(ControllerActionInvoker invoker)
}
finally
{
diagnosticListener.AfterActionMethod(
diagnosticListener.AfterControllerActionMethod(
controllerContext,
arguments,
controllerContext,
Expand Down
287 changes: 157 additions & 130 deletions src/Mvc/Mvc.Core/src/MvcCoreDiagnosticListenerExtensions.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ public partial interface IRazorCompiledItemProvider
}
namespace Microsoft.AspNetCore.Mvc.Diagnostics
{
public sealed partial class AfterViewPage : Microsoft.AspNetCore.Mvc.Diagnostics.EventData
public sealed partial class AfterViewPageEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData
{
public const string EventName = "Microsoft.AspNetCore.Mvc.Razor.AfterViewPage";
public AfterViewPage(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) { }
public AfterViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) { }
public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
protected override int Count { get { throw null; } }
public Microsoft.AspNetCore.Http.HttpContext HttpContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
protected override System.Collections.Generic.KeyValuePair<string, object> this[int index] { get { throw null; } }
public Microsoft.AspNetCore.Mvc.Razor.IRazorPage Page { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
public sealed partial class BeforeViewPage : Microsoft.AspNetCore.Mvc.Diagnostics.EventData
public sealed partial class BeforeViewPageEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData
{
public const string EventName = "Microsoft.AspNetCore.Mvc.Razor.BeforeViewPage";
public BeforeViewPage(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) { }
public BeforeViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) { }
public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
protected override int Count { get { throw null; } }
public Microsoft.AspNetCore.Http.HttpContext HttpContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
Expand Down
12 changes: 6 additions & 6 deletions src/Mvc/Mvc.Razor/src/Diagnostics/MvcDiagnostics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

namespace Microsoft.AspNetCore.Mvc.Diagnostics
{
public sealed class BeforeViewPage : EventData
public sealed class BeforeViewPageEventData : EventData
{
public const string EventName = EventNamespace +
"Razor." +
nameof(BeforeViewPage);
"BeforeViewPage";

public BeforeViewPage(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
public BeforeViewPageEventData(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
{
Page = page;
ViewContext = viewContext;
Expand All @@ -41,13 +41,13 @@ public BeforeViewPage(IRazorPage page, ViewContext viewContext, ActionDescriptor
};
}

public sealed class AfterViewPage : EventData
public sealed class AfterViewPageEventData : EventData
{
public const string EventName = EventNamespace +
"Razor." +
nameof(AfterViewPage);
"AfterViewPage";

public AfterViewPage(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
public AfterViewPageEventData(IRazorPage page, ViewContext viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
{
Page = page;
ViewContext = viewContext;
Expand Down
12 changes: 6 additions & 6 deletions src/Mvc/Mvc.Razor/src/MvcRazorDiagnosticListenerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ private static void BeforeViewPageImpl(
IRazorPage page,
ViewContext viewContext)
{
if (diagnosticListener.IsEnabled(Diagnostics.BeforeViewPage.EventName))
if (diagnosticListener.IsEnabled(Diagnostics.BeforeViewPageEventData.EventName))
{
diagnosticListener.Write(
Diagnostics.BeforeViewPage.EventName,
new BeforeViewPage(
Diagnostics.BeforeViewPageEventData.EventName,
new BeforeViewPageEventData(
page,
viewContext,
viewContext.ActionDescriptor,
Expand All @@ -57,11 +57,11 @@ private static void AfterViewPageImpl(
IRazorPage page,
ViewContext viewContext)
{
if (diagnosticListener.IsEnabled(Diagnostics.AfterViewPage.EventName))
if (diagnosticListener.IsEnabled(Diagnostics.AfterViewPageEventData.EventName))
{
diagnosticListener.Write(
Diagnostics.AfterViewPage.EventName,
new AfterViewPage(
Diagnostics.AfterViewPageEventData.EventName,
new AfterViewPageEventData(
page,
viewContext,
viewContext.ActionDescriptor,
Expand Down
Loading