|
36 | 36 | namespace GameFrameX.Foundation.Extensions; |
37 | 37 |
|
38 | 38 | /// <summary> |
39 | | -/// 用于明确指定 NullableDictionary 的 fallback 值的包装类型 |
| 39 | +/// 用于明确指定 NullableDictionary 的 fallback 值的包装类型。 |
40 | 40 | /// </summary> |
41 | | -/// <typeparam name="TValue">值的类型</typeparam> |
| 41 | +/// <remarks> |
| 42 | +/// A wrapper type used to explicitly specify the fallback value for NullableDictionary. |
| 43 | +/// </remarks> |
| 44 | +/// <typeparam name="TValue">值的类型 / The type of the value.</typeparam> |
42 | 45 | public readonly struct FallbackValue<TValue> |
43 | 46 | { |
44 | 47 | /// <summary> |
45 | | - /// 获取包装的值 |
| 48 | + /// 获取包装的值。 |
46 | 49 | /// </summary> |
47 | | - /// <value>包装的泛型类型 T 的值</value> |
| 50 | + /// <remarks> |
| 51 | + /// Gets the wrapped value. |
| 52 | + /// </remarks> |
| 53 | + /// <value>包装的泛型类型 T 的值 / The wrapped value of type T.</value> |
48 | 54 | public TValue Value { get; } |
49 | 55 |
|
50 | 56 | /// <summary> |
51 | | - /// 初始化一个包含指定值的 FallbackValue |
| 57 | + /// 初始化一个包含指定值的 FallbackValue。 |
52 | 58 | /// </summary> |
53 | | - /// <param name="value"></param> |
| 59 | + /// <remarks> |
| 60 | + /// Initializes a new instance of the <see cref="FallbackValue{TValue}"/> struct with the specified value. |
| 61 | + /// </remarks> |
| 62 | + /// <param name="value">要包装的值 / The value to wrap.</param> |
54 | 63 | public FallbackValue(TValue value) |
55 | 64 | { |
56 | 65 | Value = value; |
57 | 66 | } |
58 | 67 |
|
59 | 68 | /// <summary> |
60 | | - /// 将 TValue 转换为 FallbackValue |
| 69 | + /// 将 TValue 隐式转换为 FallbackValue。 |
61 | 70 | /// </summary> |
62 | | - /// <param name="value"></param> |
63 | | - /// <returns></returns> |
| 71 | + /// <remarks> |
| 72 | + /// Implicitly converts a value of type TValue to a <see cref="FallbackValue{TValue}"/>. |
| 73 | + /// </remarks> |
| 74 | + /// <param name="value">要转换的值 / The value to convert.</param> |
| 75 | + /// <returns>一个包含指定值的 FallbackValue 实例 / A <see cref="FallbackValue{TValue}"/> instance containing the specified value.</returns> |
64 | 76 | public static implicit operator FallbackValue<TValue>(TValue value) |
65 | 77 | { |
66 | 78 | return new FallbackValue<TValue>(value); |
67 | 79 | } |
68 | 80 | } |
69 | 81 |
|
70 | 82 | /// <summary> |
71 | | -/// 可空字典,支持 null 键和自定义默认值 |
| 83 | +/// 可空字典,支持 null 键和自定义默认值。 |
72 | 84 | /// </summary> |
73 | | -/// <typeparam name="TKey">键的类型</typeparam> |
74 | | -/// <typeparam name="TValue">值的类型</typeparam> |
| 85 | +/// <remarks> |
| 86 | +/// A dictionary that supports null keys and custom default values. |
| 87 | +/// </remarks> |
| 88 | +/// <typeparam name="TKey">键的类型 / The type of the keys in the dictionary.</typeparam> |
| 89 | +/// <typeparam name="TValue">值的类型 / The type of the values in the dictionary.</typeparam> |
75 | 90 | public class NullableDictionary<TKey, TValue> : Dictionary<NullObject<TKey>, TValue> |
76 | 91 | { |
77 | 92 | /// <summary> |
|
0 commit comments