mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 18:52:08 +08:00
- 在 GFramework.Core.Abstractions 中添加 // ReSharper disable CheckNamespace 注释 - 在 GFramework.Game.Abstractions 中添加 // ReSharper disable CheckNamespace 注释 - 解决代码分析工具对命名空间检查的警告问题
20 lines
609 B
C#
20 lines
609 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;
|
|
|
|
// ReSharper disable CheckNamespace
|
|
|
|
namespace System.Runtime.CompilerServices;
|
|
|
|
/// <summary>
|
|
/// 提供一个占位符类型,用于支持 C# 9.0 的 init 访问器功能。
|
|
/// 该类型在 .NET 5.0 及更高版本中已内置,因此仅在较低版本的 .NET 中定义。
|
|
/// </summary>
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
internal static class IsExternalInit
|
|
{
|
|
}
|
|
#endif |