mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(abstractions): 更新 IsExternalInit 类型定义
- 将预处理器条件从具体版本改为 !NET5_0_OR_GREATER - 修改类访问修饰符为 internal - 更新 XML 注释文档,添加对 .NET 5.0+ 版本的说明 - 移除中文注释中的特殊字符描述 - 优化代码可读性和维护性
This commit is contained in:
parent
89b7bcca8a
commit
808d3beecf
@ -2,16 +2,17 @@
|
||||
// This type is required to support init-only setters and record types
|
||||
// when targeting netstandard2.0 or older frameworks.
|
||||
|
||||
#if NETSTANDARD2_1 || NETFRAMEWORK || NETCOREAPP2_1
|
||||
#if !NET5_0_OR_GREATER
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Runtime.CompilerServices;
|
||||
|
||||
/// <summary>
|
||||
/// 用于标记仅初始化 setter 的特殊类型
|
||||
/// 提供一个占位符类型,用于支持 C# 9.0 的 init 访问器功能。
|
||||
/// 该类型在 .NET 5.0 及更高版本中已内置,因此仅在较低版本的 .NET 中定义。
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static class IsExternalInit
|
||||
internal static class IsExternalInit
|
||||
{
|
||||
}
|
||||
#endif
|
||||
Loading…
x
Reference in New Issue
Block a user