Skip to content

Commit e2c25f0

Browse files
Copilotcaptainsafia
andcommitted
Add back obsolete attributes to IActionContextAccessor interface and ActionContextAccessor class
Co-authored-by: captainsafia <[email protected]>
1 parent 843dfd3 commit e2c25f0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Mvc/Mvc.Core/src/Infrastructure/ActionContextAccessor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure;
1010
/// <summary>
1111
/// Type that provides access to an <see cref="ActionContext"/>.
1212
/// </summary>
13+
[Obsolete("ActionContextAccessor is obsolete. Use IHttpContextAccessor instead and access the endpoint information from HttpContext.GetEndpoint(). This type will be removed in a future version.")]
1314
public class ActionContextAccessor : IActionContextAccessor
1415
{
1516
internal static readonly IActionContextAccessor Null = new NullActionContextAccessor();

src/Mvc/Mvc.Core/src/Infrastructure/IActionContextAccessor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure;
1010
/// <summary>
1111
/// Defines an interface for exposing an <see cref="ActionContext"/>.
1212
/// </summary>
13+
[Obsolete("IActionContextAccessor is obsolete. Use IHttpContextAccessor instead and access the endpoint information from HttpContext.GetEndpoint(). This type will be removed in a future version.")]
1314
public interface IActionContextAccessor
1415
{
1516
/// <summary>

0 commit comments

Comments
 (0)