mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
feat(globalusings): 为旧版.NET框架添加IsExternalInit兼容性支持
- 在GlobalUsings.cs中添加条件编译指令支持NETSTANDARD2_0、NETFRAMEWORK和NETCOREAPP2_0 - 添加System.ComponentModel命名空间引用 - 实现IsExternalInit静态类以支持仅初始化setter语法 - 使用EditorBrowsable特性标记为隐藏状态避免IDE显示 - 确保新功能仅在目标框架版本下可用
This commit is contained in:
parent
31045f305c
commit
d250ee1d93
@ -15,4 +15,18 @@ global using System;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Linq;
|
||||
global using System.Threading;
|
||||
global using System.Threading.Tasks;
|
||||
global using System.Threading.Tasks;
|
||||
#if NETSTANDARD2_0 || NETFRAMEWORK || NETCOREAPP2_0
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于标记仅初始化 setter 的特殊类型
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static class IsExternalInit
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
x
Reference in New Issue
Block a user