From ad80af4b30178893f91cd5e5274d7235b536bd36 Mon Sep 17 00:00:00 2001
From: Willy <63505597+willysoft@users.noreply.github.com>
Date: Fri, 18 Apr 2025 14:16:11 +0800
Subject: [PATCH] docs: Translate XML comments from Chinese to English
---
.../AutoQueryServiceExtensions.cs | 10 +-
.../EnableFieldProjectionAttribute.cs | 86 ++++----
.../Abstractions/IFilterExpressionBuilder.cs | 12 +-
.../Abstractions/IFilterQueryConfiguration.cs | 10 +-
src/AutoQuery/Abstractions/IQueryOptions.cs | 6 +-
.../Abstractions/IQueryPagedOptions.cs | 6 +-
src/AutoQuery/Abstractions/IQueryProcessor.cs | 22 +-
.../ComplexFilterQueryPropertyBuilder.cs | 20 +-
...lexFilterQueryPropertyBuilderExtensions.cs | 204 +++++++++---------
.../Extensions/ExpressionExtensions.cs | 70 +++---
src/AutoQuery/Extensions/QueryExtensions.cs | 50 ++---
...pleFilterQueryPropertyBuilderExtensions.cs | 64 +++---
src/AutoQuery/FilterQueryBuilder.cs | 66 +++---
src/AutoQuery/LogicalOperator.cs | 6 +-
src/AutoQuery/PagedResult.cs | 14 +-
src/AutoQuery/QueryProcessor.cs | 22 +-
.../SimpleFilterQueryPropertyBuilder.cs | 14 +-
17 files changed, 341 insertions(+), 341 deletions(-)
diff --git a/src/AutoQuery.AspNetCore/AutoQueryServiceExtensions.cs b/src/AutoQuery.AspNetCore/AutoQueryServiceExtensions.cs
index b38658a..a536dab 100644
--- a/src/AutoQuery.AspNetCore/AutoQueryServiceExtensions.cs
+++ b/src/AutoQuery.AspNetCore/AutoQueryServiceExtensions.cs
@@ -8,16 +8,16 @@
namespace Microsoft.AspNetCore.Builder;
///
-/// 提供查詢服務相關的擴展方法。
+/// Provides extension methods related to query services.
///
public static class AutoQueryServiceExtensions
{
///
- /// 向服務集合中添加查詢建構器服務。
+ /// Adds query builder services to the service collection.
///
- /// 服務集合。
- /// 要應用配置的程序集。
- /// 更新後的服務集合。
+ /// The service collection.
+ /// The assembly to apply configurations from.
+ /// The updated service collection.
public static IServiceCollection AddAutoQuery(this IServiceCollection services, Assembly assembly)
{
ArgumentNullException.ThrowIfNull(services);
diff --git a/src/AutoQuery.AspNetCore/EnableFieldProjectionAttribute.cs b/src/AutoQuery.AspNetCore/EnableFieldProjectionAttribute.cs
index 8921855..52c5656 100644
--- a/src/AutoQuery.AspNetCore/EnableFieldProjectionAttribute.cs
+++ b/src/AutoQuery.AspNetCore/EnableFieldProjectionAttribute.cs
@@ -13,7 +13,7 @@
namespace AutoQuery.AspNetCore;
///
-/// 字段投影屬性,用於在返回結果中僅包含指定的字段。
+/// Field projection attribute used to include only specified fields in the returned result.
///
public class EnableFieldProjectionAttribute : ActionFilterAttribute
{
@@ -24,18 +24,18 @@ public class EnableFieldProjectionAttribute : ActionFilterAttribute
private IQueryOptions? _queryOptions;
///
- /// 在操作執行之前調用,從操作參數中提取 QueryOptions。
+ /// Called before the action is executed to extract QueryOptions from the action parameters.
///
- /// 操作執行上下文。
+ /// The action execution context.
public override void OnActionExecuting(ActionExecutingContext context)
{
_queryOptions = ExtractQueryOptions(context);
}
///
- /// 在操作執行之後調用,根據指定的字段過濾返回結果。
+ /// Called after the action is executed to filter the returned result based on the specified fields.
///
- /// 操作執行上下文。
+ /// The action execution context.
public override void OnActionExecuted(ActionExecutedContext context)
{
if (_queryOptions == null || string.IsNullOrEmpty(_queryOptions.Fields))
@@ -53,12 +53,12 @@ public override void OnActionExecuted(ActionExecutedContext context)
}
///
- /// 過濾結果,僅包含選擇的字段。
+ /// Filters the result to include only the selected fields.
///
- /// 要過濾的對象。
- /// 選擇的字段集合。
- /// JSON 序列化選項。
- /// 過濾後的對象。
+ /// The object to filter.
+ /// The set of selected fields.
+ /// JSON serialization options.
+ /// The filtered object.
private static object FilterResult(object value, HashSet selectedFields, JsonSerializerOptions serializerOptions)
{
if (value is IEnumerable