GeWuYou d250ee1d93 feat(globalusings): 为旧版.NET框架添加IsExternalInit兼容性支持
- 在GlobalUsings.cs中添加条件编译指令支持NETSTANDARD2_0、NETFRAMEWORK和NETCOREAPP2_0
- 添加System.ComponentModel命名空间引用
- 实现IsExternalInit静态类以支持仅初始化setter语法
- 使用EditorBrowsable特性标记为隐藏状态避免IDE显示
- 确保新功能仅在目标框架版本下可用
2026-01-27 23:03:35 +08:00

32 lines
1.0 KiB
C#

// Copyright (c) 2025 GeWuYou
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading;
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