Minor fixes to polyfills
このコミットが含まれているのは:
1 親
3d0217dc7d
コミット
6415972f51
5ファイル変更
+36
-20
検索条件に一致するファイルはありません
+4
-1
@@ -1,4 +1,7 @@
|
||||
namespace System.Diagnostics.CodeAnalysis;
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace System.Diagnostics.CodeAnalysis;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies that the method or property will ensure that the listed field and property members have not-null values.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Runtime.CompilerServices;
|
||||
|
||||
|
||||
+6
-3
@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace ComputeSharp.NetStandard.System.Runtime.InteropServices;
|
||||
using System;
|
||||
|
||||
namespace ComputeSharp.NetStandard.System.Runtime.InteropServices; // This cannot be in System.Runtime.InteropServices, or Roslyn will recognize it
|
||||
|
||||
/// <summary>
|
||||
/// Any method marked with <see cref="UnmanagedCallersOnlyAttribute" /> can be directly called from native code.
|
||||
@@ -9,6 +12,6 @@ namespace ComputeSharp.NetStandard.System.Runtime.InteropServices;
|
||||
/// 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
|
||||
internal sealed class UnmanagedCallersOnlyAttribute : Attribute
|
||||
{
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace System.Runtime.Versioning;
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace System.Runtime.Versioning;
|
||||
|
||||
/// <summary>
|
||||
/// Base type for all platform-specific API attributes.
|
||||
|
||||
+18
-14
@@ -1,4 +1,7 @@
|
||||
namespace System.Runtime.Versioning;
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
namespace System.Runtime.Versioning;
|
||||
|
||||
/// <summary>
|
||||
/// Records the operating system (and minimum version) that supports an API. Multiple
|
||||
@@ -9,19 +12,20 @@
|
||||
/// or use guards to prevent calls to APIs on unsupported operating systems.
|
||||
/// A given platform should only be specified once.
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Enum |
|
||||
AttributeTargets.Event |
|
||||
AttributeTargets.Field |
|
||||
AttributeTargets.Interface |
|
||||
AttributeTargets.Method |
|
||||
AttributeTargets.Module |
|
||||
AttributeTargets.Property |
|
||||
AttributeTargets.Struct,
|
||||
AllowMultiple = true,
|
||||
Inherited = false)]
|
||||
[AttributeUsage(
|
||||
AttributeTargets.Assembly |
|
||||
AttributeTargets.Class |
|
||||
AttributeTargets.Constructor |
|
||||
AttributeTargets.Enum |
|
||||
AttributeTargets.Event |
|
||||
AttributeTargets.Field |
|
||||
AttributeTargets.Interface |
|
||||
AttributeTargets.Method |
|
||||
AttributeTargets.Module |
|
||||
AttributeTargets.Property |
|
||||
AttributeTargets.Struct,
|
||||
AllowMultiple = true,
|
||||
Inherited = false)]
|
||||
internal sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
|
||||
{
|
||||
public SupportedOSPlatformAttribute(string platformName)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする