|
3 | 3 | // GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights |
4 | 4 | // 均受中华人民共和国及相关国际法律法规保护。 |
5 | 5 | // are protected by the laws of the People's Republic of China and relevant international regulations. |
6 | | -// |
| 6 | +// |
7 | 7 | // 使用本项目须严格遵守相应法律法规及开源许可证之规定。 |
8 | 8 | // Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses. |
9 | | -// |
| 9 | +// |
10 | 10 | // 本项目采用 MIT 许可证与 Apache License 2.0 双许可证分发, |
11 | 11 | // This project is dual-licensed under the MIT License and Apache License 2.0, |
12 | 12 | // 完整许可证文本请参见源代码根目录下的 LICENSE 文件。 |
13 | 13 | // please refer to the LICENSE file in the root directory of the source code for the full license text. |
14 | | -// |
| 14 | +// |
15 | 15 | // 禁止利用本项目实施任何危害国家安全、破坏社会秩序、 |
16 | 16 | // It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order, |
17 | 17 | // 侵犯他人合法权益等法律法规所禁止的行为! |
|
20 | 20 | // Any legal disputes and liabilities arising from secondary development based on this project |
21 | 21 | // 本项目组织与贡献者概不承担。 |
22 | 22 | // shall be borne solely by the developer; the project organization and contributors assume no responsibility. |
23 | | -// |
| 23 | +// |
24 | 24 | // GitHub 仓库:https://github.com/GameFrameX |
25 | 25 | // GitHub Repository: https://github.com/GameFrameX |
26 | 26 | // Gitee 仓库:https://gitee.com/GameFrameX |
|
33 | 33 |
|
34 | 34 | namespace GameFrameX.Foundation.Extensions; |
35 | 35 |
|
| 36 | +/// <summary> |
| 37 | +/// 反射扩展类,/// </summary> |
| 38 | +/// <remarks> |
| 39 | +/// 此类中的所有扩展方法已过时。在现代 .NET(.NET 5+)中,Type 类已直接包含这些功能, |
| 40 | +/// 无需通过扩展方法调用。请直接使用 Type 类的实例方法/属性。 |
| 41 | +/// |
| 42 | +/// 迁移指南: |
| 43 | +/// <list type="bullet"> |
| 44 | +/// <item><description>type.GetTypeInfo() -> 直接使用 type(无需调用)</description></item> |
| 45 | +/// <item><description>type.GetGenericArguments() -> type.GetGenericArguments()(使用实例方法)</description></item> |
| 46 | +/// <item><description>type.IsGenericType() -> type.IsGenericType(使用属性)</description></item> |
| 47 | +/// <item><description>type.GetProperties() -> type.GetProperties()(使用实例方法)</description></item> |
| 48 | +/// <item><description>type.GetProperty(name) -> type.GetProperty(name)(使用实例方法)</description></item> |
| 49 | +/// <item><description>type.GetField(name) -> type.GetField(name)(使用实例方法)</description></item> |
| 50 | +/// <item><description>type.IsEnum() -> type.IsEnum(使用属性)</description></item> |
| 51 | +/// <item><description>type.GetMethod(...) -> type.GetMethod(...)(使用实例方法)</description></item> |
| 52 | +/// <item><description>type.GetConstructor(types) -> type.GetConstructor(types)(使用实例方法)</description></item> |
| 53 | +/// <item><description>type.IsValueType() -> type.IsValueType(使用属性)</description></item> |
| 54 | +/// <item><description>type.IsEntity() -> type.IsClass(使用属性)</description></item> |
| 55 | +/// </list> |
| 56 | +/// </remarks> |
| 57 | +[Obsolete("此扩展类中的所有方法在现代 .NET 中已不再需要,请直接使用 Type 类的实例方法/属性。")] |
| 58 | + |
36 | 59 | /// <summary> |
37 | 60 | /// 反射扩展类,提供了一系列用于反射操作的扩展方法 |
38 | 61 | /// </summary> |
|
0 commit comments