Add [UnmanagedCallersOnly] polyfill type

このコミットが含まれているのは:
Sergio Pedri committed 2021-12-08 18:43:57 +01:00
1 親 e14c91f429
コミット 0e8b2fd02b
3ファイル変更
+42 -36

検索条件に一致するファイルはありません

@@ -0,0 +1,14 @@
using System;
namespace ComputeSharp.NetStandard.System.Runtime.InteropServices;
/// <summary>
/// Any method marked with <see cref="UnmanagedCallersOnlyAttribute" /> can be directly called from native code.
/// </summary>
/// <remarks>
/// This polyfill is deliberately in the wrong namespace to avoid the C# compiler failing to build below .NET 5.
/// </remarks>
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class UnmanagedCallersOnlyAttribute : Attribute
{
}