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