diff --git a/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs b/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs
index 95e07f48eb7..847d91b3183 100644
--- a/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs
+++ b/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs
@@ -10,14 +10,14 @@
namespace BootstrapBlazor.Components;
///
-/// DataTable 动态数据上下文实现类
-/// DataTable 动态data上下文实现类
+/// DataTable 动态数据上下文实现类
+/// DataTable dynamic data context implementation class
///
public class DataTableDynamicContext : DynamicObjectContext
{
///
/// 获得/设置 相关联的 DataTable 实例
- /// Gets or sets 相关联的 DataTable instance
+ /// Gets or sets the associated DataTable instance
///
[NotNull]
public DataTable? DataTable { get; set; }
@@ -32,37 +32,45 @@ public class DataTableDynamicContext : DynamicObjectContext
///
/// 获得/设置 是否启用内部缓存 默认 true 启用
- /// Gets or sets whether启用内部缓存 Default is true 启用
+ /// Gets or sets whether to enable internal caching. Default is true.
///
public bool UseCache { get; set; } = true;
///
/// 负责将 DataRow 与 Items 关联起来方便查找提高效率
- /// 负责将 DataRow 与 Items 关联起来方便查找提高效率
+ /// Responsible for associating DataRow with Items to facilitate lookup and improve efficiency
///
private ConcurrentDictionary Caches { get; } = new();
///
/// 添加行回调委托
- /// 添加行回调delegate
+ /// Add row callback delegate
///
public Func, Task>? OnAddAsync { get; set; }
///
/// 删除行回调委托
- /// 删除行回调delegate
+ /// Delete row callback delegate
///
public Func, Task>? OnDeleteAsync { get; set; }
///
/// 构造函数
- /// 构造函数
+ /// Constructor
///
///
///
- /// 永远不显示的列集合 默认为 null 全部显示永远不display的列collection default is为 null 全部display
- /// 显示列集合 默认为 null 全部显示display列collection default is为 null 全部display
- /// 隐藏列集合 默认为 null 无隐藏列隐藏列collection default is为 null 无隐藏列
+ ///
+ /// 永远不显示的列集合 默认为 null 全部显示
+ /// Collection of columns that are never displayed. Default is null, meaning all columns are displayed.
+ ///
+ ///
+ /// 显示列集合 默认为 null 全部显示
+ /// Collection of columns that are always displayed. Default is null, meaning all columns are displayed.
+ ///
+ /// 隐藏列集合 默认为 null 无隐藏列
+ /// Collection of columns that are hidden. Default is null, meaning no columns are hidden.
+ ///
public DataTableDynamicContext(DataTable table, Action? addAttributesCallback = null, IEnumerable? invisibleColumns = null, IEnumerable? shownColumns = null, IEnumerable? hiddenColumns = null)
{
DataTable = table;
@@ -111,8 +119,7 @@ private static bool GetShownColumns(ITableColumn col, IEnumerable? invis
}
///
- /// GetItems 方法
- /// GetItems 方法
+ ///
///
public override IEnumerable GetItems()
{
@@ -157,15 +164,10 @@ private List BuildItems()
}
///
- /// GetItems 方法
- /// GetItems 方法
+ ///
///
public override IEnumerable GetColumns() => Columns;
- ///
- /// 获得列信息方法
- /// Gets列信息方法
- ///
private List InternalGetColumns()
{
var ret = new List();
@@ -177,10 +179,8 @@ private List InternalGetColumns()
}
///
- ///
- ///
+ ///
///
- ///
protected internal override IEnumerable OnColumnCreating(ITableColumn col)
{
AddAttributesCallback?.Invoke(this, col);
@@ -189,10 +189,8 @@ protected internal override IEnumerable OnColumnCreating
#region Add Save Delete
///
- /// 新建方法
- /// 新建方法
+ ///
///
- /// 当前选中行当前选中行
public override async Task AddAsync(IEnumerable selectedItems)
{
if (OnAddAsync != null)
@@ -239,10 +237,8 @@ public override async Task AddAsync(IEnumerable selectedItems)
}
///
- /// 删除方法
- /// 删除方法
+ ///
///
- ///
public override async Task DeleteAsync(IEnumerable items)
{
var ret = false;
@@ -284,8 +280,8 @@ public override async Task DeleteAsync(IEnumerable items)
}
///
- /// 动态类型变更回调方法
- /// 动态type变更callback method
+ /// 单元格变更回调方法
+ /// Cell value changed callback method
///
///
///
diff --git a/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs b/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs
index 6723b220791..c24df1046d0 100644
--- a/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs
+++ b/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs
@@ -9,7 +9,7 @@ namespace BootstrapBlazor.Components;
///
/// DataTable 动态类实例
-/// DataTable 动态类instance
+/// DataTable dynamic class instance
///
public class DataTableDynamicObject : DynamicObject
{
@@ -45,8 +45,6 @@ public class DataTableDynamicObject : DynamicObject
///
///
///
- ///
- ///
public override void SetValue(string propertyName, object? value)
{
base.SetValue(propertyName, value);
diff --git a/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs b/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs
index ad592cf2702..7d652626127 100644
--- a/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs
+++ b/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs
@@ -6,25 +6,26 @@
namespace BootstrapBlazor.Components;
///
-/// 动态列类
-/// 动态列类
+/// 实现类
+/// implementation class
///
public class DynamicColumnsObject : IDynamicColumnsObject
{
///
- ///
+ /// 获得/设置 列集合
+ /// Gets or sets the column collection
///
public Dictionary Columns { get; set; }
///
/// 获得/设置 行主键
- /// Gets or sets 行主键
+ /// Gets or sets the row primary key
///
public Guid DynamicObjectPrimaryKey { get; set; }
///
/// 构造函数
- /// 构造函数
+ /// Constructor
///
///
public DynamicColumnsObject(Dictionary columnsData)
@@ -34,12 +35,13 @@ public DynamicColumnsObject(Dictionary columnsData)
///
/// 构造函数
- /// 构造函数
+ /// Constructor
///
public DynamicColumnsObject() : this([]) { }
///
- ///
+ /// 获得列的值
+ /// Gets the value of a column
///
///
public virtual object? GetValue(string propertyName)
@@ -48,10 +50,9 @@ public DynamicColumnsObject() : this([]) { }
}
///
- ///
+ /// 设置列的值
+ /// Sets the value of a column
///
- ///
- ///
public virtual void SetValue(string propertyName, object? value)
{
Columns[propertyName] = value;
diff --git a/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs b/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs
index 99d258c3d24..7b8adf4e4c2 100644
--- a/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs
+++ b/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs
@@ -6,20 +6,20 @@
namespace BootstrapBlazor.Components;
///
-/// DynamicItemChangedType 类型
-/// DynamicItemChangedType type
+/// DynamicItemChangedType 枚举类型
+/// DynamicItemChangedType enum type
///
public enum DynamicItemChangedType
{
///
/// 新建
- /// 新建
+ /// Add
///
Add,
///
/// 删除
- /// 删除
+ /// Delete
///
Delete
}
diff --git a/src/BootstrapBlazor/Dynamic/DynamicObject.cs b/src/BootstrapBlazor/Dynamic/DynamicObject.cs
index 8c03f16d77a..8a854c6764f 100644
--- a/src/BootstrapBlazor/Dynamic/DynamicObject.cs
+++ b/src/BootstrapBlazor/Dynamic/DynamicObject.cs
@@ -6,8 +6,8 @@
namespace BootstrapBlazor.Components;
///
-/// 动态类型实体类 实例
-/// 动态type实体类 instance
+/// 实现类
+/// implementation class
///
public class DynamicObject : IDynamicObject
{
@@ -19,14 +19,14 @@ public class DynamicObject : IDynamicObject
///
/// 获得指定属性值方法
- /// Gets指定property值方法
+ /// Gets the value of a specified property
///
///
public virtual object? GetValue(string propertyName) => Utility.GetPropertyValue(this, propertyName);
///
/// 给指定属性设置值方法
- /// 给指定propertySets值方法
+ /// Sets the value of a specified property
///
///
///
diff --git a/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs b/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs
index 26c785ae5fa..8ec0373ff5c 100644
--- a/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs
+++ b/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs
@@ -10,39 +10,33 @@
namespace BootstrapBlazor.Components;
///
-/// 动态类型上下文基类
-/// 动态type上下文基类
+/// 实现类基类
+/// base class
///
public abstract class DynamicObjectContext : IDynamicObjectContext
{
///
/// 获取动态类型各列信息
- /// 获取动态type各列信息
+ /// Gets the column information of the dynamic type
///
public abstract IEnumerable GetColumns();
///
/// 获得动态类数据方法
- /// Gets动态类data方法
+ /// Gets the data of the dynamic type
///
public abstract IEnumerable GetItems();
///
- ///
- ///
+ /// 获取自定义属性构建器缓存
+ /// Gets the custom attribute builder cache
///
protected ConcurrentDictionary> CustomerAttributeBuilderCache { get; } = new();
///
/// 添加标签到指定列
- /// 添加标签到指定列
+ /// Adds an attribute to the specified column
///
- /// 指定列名称指定列name
- /// Attribute 实例Attribute instance
- ///
- ///
- ///
- ///
public void AddAttribute(string columnName, Type attributeType, Type[] types, object?[] constructorArgs, PropertyInfo[]? propertyInfos = null, object?[]? propertyValues = null)
{
var attr = attributeType.GetConstructor(types);
@@ -60,7 +54,7 @@ public void AddAttribute(string columnName, Type attributeType, Type[] types, ob
///
/// 列创建回调方法 入口参数为 ITableColumn 实例 返回值为 CustomAttributeBuilder 集合
- /// 列创建callback method 入口参数为 ITableColumn instance 返回值为 CustomAttributeBuilder collection
+ /// Column creation callback method. The input parameter is an ITableColumn instance, and the return value is a collection of CustomAttributeBuilder.
///
protected internal virtual IEnumerable OnColumnCreating(ITableColumn col) => CustomerAttributeBuilderCache.TryGetValue(col.GetFieldName(), out var builders)
? builders
@@ -68,38 +62,39 @@ protected internal virtual IEnumerable OnColumnCreating(
///
/// 动态类型新建回调委托
- /// 动态type新建回调delegate
+ /// Dynamic type creation callback delegate
///
- /// 当前选中行当前选中行
+ /// 当前选中行Currently selected rows
public abstract Task AddAsync(IEnumerable selectedItems);
///
/// 动态类型删除回调委托
- /// 动态type删除回调delegate
+ /// Dynamic type deletion callback delegate
///
- ///
+ /// 要删除的行Rows to be deleted
public abstract Task DeleteAsync(IEnumerable items);
///
/// 动态类型集合变化时回调方法
- /// 动态typecollection变化时callback method
+ /// Dynamic type collection change callback method
///
public Func? OnValueChanged { get; set; }
///
/// 动态类型属性值变化时回调方法
- /// 动态typeproperty值变化时callback method
+ /// Dynamic type property value change callback method
///
public Func? OnChanged { get; set; }
///
/// 获得选中行比对回调方法
- /// Gets选中行比对callback method
+ /// Gets the selected row comparison callback method
///
public Func? EqualityComparer { get; set; }
///
- ///
+ /// 过滤回调方法
+ /// Filter callback method
///
public Func, IEnumerable>? OnFilterCallback { get; set; }
}
diff --git a/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs b/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs
index d08d51d3f45..d1d4c19cb7e 100644
--- a/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs
+++ b/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs
@@ -6,14 +6,14 @@
namespace BootstrapBlazor.Components;
///
-/// DynamicObjectContextArgs 类
-/// DynamicObjectContextArgs 类
+/// DynamicObjectContextArgs 上下文参数类
+/// DynamicObjectContextArgs context parameter class
///
public class DynamicObjectContextArgs
{
///
- ///
- ///
+ /// 构造函数
+ /// Constructor
///
public DynamicObjectContextArgs(IEnumerable items, DynamicItemChangedType changedType = DynamicItemChangedType.Add)
{
@@ -23,13 +23,13 @@ public DynamicObjectContextArgs(IEnumerable items, DynamicItemCh
///
/// 获得 编辑数据集合
- /// Gets 编辑datacollection
+ /// Gets the collection of edited data
///
public IEnumerable Items { get; }
///
/// 获得 数据改变类型 默认 Add
- /// Gets data改变type Default is Add
+ /// Gets the type of data change. Default is Add
///
public DynamicItemChangedType ChangedType { get; }
}
diff --git a/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs b/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs
index 9d66a3f7c6e..064c2d57a35 100644
--- a/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs
+++ b/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs
@@ -7,13 +7,13 @@ namespace BootstrapBlazor.Components;
///
/// 动态对象接口
-/// 动态对象接口
+/// Dynamic object interface
///
public interface IDynamicColumnsObject : IDynamicObject
{
///
/// 获得设置 列与列数值集合
- /// GetsSets 列与列数值collection
+ /// Gets or sets the collection of columns and their values
///
public Dictionary Columns { get; set; }
}
diff --git a/src/BootstrapBlazor/Dynamic/IDynamicObject.cs b/src/BootstrapBlazor/Dynamic/IDynamicObject.cs
index fe4c892658f..461d4dafde3 100644
--- a/src/BootstrapBlazor/Dynamic/IDynamicObject.cs
+++ b/src/BootstrapBlazor/Dynamic/IDynamicObject.cs
@@ -7,28 +7,28 @@ namespace BootstrapBlazor.Components;
///
/// 动态对象接口
-/// 动态对象接口
+/// Dynamic object interface
///
public interface IDynamicObject
{
///
/// 通过指定属性名获取属性值方法
- /// 通过指定property名获取property值方法
+ /// Gets the value of a property by its name
///
- /// 属性名称propertyname
+ /// 属性名称property name
object? GetValue(string propertyName);
///
/// 通过指定属性名设置属性值方法
- /// 通过指定property名Setsproperty值方法
+ /// Sets the value of a property by its name
///
- /// 属性名称propertyname
- /// 属性值propertyvalue
+ /// 属性名称property name
+ /// 属性值property value
void SetValue(string propertyName, object? value);
///
/// 获得/设置 数据主键
- /// Gets or sets data主键
+ /// Gets or sets the data primary key
///
Guid DynamicObjectPrimaryKey { get; set; }
}
diff --git a/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs b/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs
index b2478d2bf30..540515cf234 100644
--- a/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs
+++ b/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs
@@ -7,57 +7,57 @@ namespace BootstrapBlazor.Components;
///
/// 动态类型上下文接口
-/// 动态type上下文接口
+/// Dynamic type context interface
///
public interface IDynamicObjectContext
{
///
/// 获取动态类型各列信息
- /// 获取动态type各列信息
+ /// Gets the information of each column in the dynamic type
///
IEnumerable GetColumns();
///
/// 获得动态数据方法
- /// Gets动态data方法
+ /// Gets the dynamic data
///
IEnumerable GetItems();
///
/// 新建方法
- /// 新建方法
+ /// Creates new items
///
- /// 当前选中行当前选中行
+ /// 当前选中行Currently selected rows
Task AddAsync(IEnumerable selectedItems);
///
/// 删除方法
- /// 删除方法
+ /// Deletes items
///
- ///
+ /// 要删除的行Rows to be deleted
Task DeleteAsync(IEnumerable items);
///
/// 获得/设置 动态类型属性值变化时回调方法 默认为 null
- /// Gets or sets 动态typeproperty值变化时callback method Default is为 null
+ /// Gets or sets the callback method when the value of a dynamic type property changes. Default is null
///
Func? OnValueChanged { get; set; }
///
/// 获得/设置 动态类型数据集过滤回调委托 默认为 null
- /// Gets or sets 动态typedata集过滤回调delegate Default is为 null
+ /// Gets or sets the callback delegate for filtering the dynamic data set. Default is null
///
Func, IEnumerable>? OnFilterCallback { get; set; }
///
/// 获得/设置 动态类型集合变化时回调方法 默认为 null
- /// Gets or sets 动态typecollection变化时callback method Default is为 null
+ /// Gets or sets the callback method when the dynamic type collection changes. Default is null
///
Func? OnChanged { get; set; }
///
/// 获得/设置 选中行是否相等判断逻辑 默认为 null
- /// Gets or sets 选中行whether相等判断逻辑 Default is为 null
+ /// Gets or sets the logic for determining whether selected rows are equal. Default is null
///
Func? EqualityComparer { get; set; }
}