Skip to content

Commit

Permalink
移除 IsStaticResource 方法的 HttpContext 参数
Browse files Browse the repository at this point in the history
在 `CalculateExecutionTimeMiddleware.cs` 文件中,`CalculateExecutionTimeMiddleware` 类的 `_webHelper.IsStaticResource` 方法调用不再传递 `HttpContext` 参数。
在 `IWebHelper.cs` 文件中,`IWebHelper` 接口的 `IsStaticResource` 方法不再接受 `HttpContext` 参数。
  • Loading branch information
猿人易 committed Nov 22, 2024
1 parent d4e8c30 commit bc3934c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task Invoke(Microsoft.AspNetCore.Http.HttpContext ctx)
}

// 检查是否为静态资源
if (_webHelper.IsStaticResource(ctx))
if (_webHelper.IsStaticResource())
{
await _next.Invoke(ctx);
return;
Expand Down
2 changes: 1 addition & 1 deletion Pek.AspNetCore/Webs/IWebHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public partial interface IWebHelper
/// 如果请求的资源是不需要 CMS 引擎处理的典型资源之一,则返回 true。
/// </summary>
/// <returns>如果请求针对的是静态资源文件,则返回真。</returns>
Boolean IsStaticResource(Microsoft.AspNetCore.Http.HttpContext? httpContext = null);
Boolean IsStaticResource();

/// <summary>
/// 修改 URL 的查询字符串
Expand Down

0 comments on commit bc3934c

Please sign in to comment.