-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from teo-tsirpanis/net9
Add polyfills for .NET 9 attributes.
- Loading branch information
Showing
13 changed files
with
234 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.100", | ||
"version": "9.0.100", | ||
"rollForward": "latestFeature", | ||
"allowPrerelease": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...beddedResources/RuntimeSupported/System.Diagnostics.CodeAnalysis.FeatureGuardAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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> | ||
/// Indicates that the specified public static boolean get-only property | ||
/// guards access to the specified feature. | ||
/// </summary> | ||
/// <remarks> | ||
/// Analyzers can use this to prevent warnings on calls to code that is | ||
/// annotated as requiring that feature, when the callsite is guarded by a | ||
/// call to the property. | ||
/// </remarks> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false, AllowMultiple = true)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")] | ||
internal sealed class FeatureGuardAttribute : global::System.Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureGuardAttribute"/> class | ||
/// with the specified feature type. | ||
/// </summary> | ||
/// <param name="featureType"> | ||
/// The type that represents the feature guarded by the property. | ||
/// </param> | ||
public FeatureGuardAttribute(global::System.Type featureType) | ||
{ | ||
FeatureType = featureType; | ||
} | ||
|
||
/// <summary> | ||
/// The type that represents the feature guarded by the property. | ||
/// </summary> | ||
public global::System.Type FeatureType { get; } | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...rces/RuntimeSupported/System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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> | ||
/// Indicates that the specified public static boolean get-only property | ||
/// corresponds to the feature switch specified by name. | ||
/// </summary> | ||
/// <remarks> | ||
/// IL rewriters and compilers can use this to substitute the return value | ||
/// of the specified property with the value of the feature switch. | ||
/// </remarks> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")] | ||
internal sealed class FeatureSwitchDefinitionAttribute : global::System.Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute"/> class | ||
/// with the specified feature switch name. | ||
/// </summary> | ||
/// <param name="switchName"> | ||
/// The name of the feature switch that provides the value for the specified property. | ||
/// </param> | ||
public FeatureSwitchDefinitionAttribute(string switchName) | ||
{ | ||
SwitchName = switchName; | ||
} | ||
|
||
/// <summary> | ||
/// The name of the feature switch that provides the value for the specified property. | ||
/// </summary> | ||
public string SwitchName { get; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...es/RuntimeSupported/System.Diagnostics.DebuggerDisableUserUnhandledExceptionsAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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 | ||
{ | ||
/// <summary> | ||
/// If a .NET Debugger is attached which supports the Debugger.BreakForUserUnhandledException(Exception) API, | ||
/// this attribute will prevent the debugger from breaking on user-unhandled exceptions when the | ||
/// exception is caught by a method with this attribute, unless BreakForUserUnhandledException is called. | ||
/// </summary> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Method)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")] | ||
internal sealed class DebuggerDisableUserUnhandledExceptionsAttribute : global::System.Attribute | ||
{ | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...edResources/RuntimeSupported/System.Runtime.InteropServices.WasmImportLinkageAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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.InteropServices | ||
{ | ||
/// <summary> | ||
/// Specifies that the P/Invoke marked with this attribute should be linked in as a WASM import. | ||
/// </summary> | ||
/// <remarks> | ||
/// See https://webassembly.github.io/spec/core/syntax/modules.html#imports. | ||
/// </remarks> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Method, Inherited = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")] | ||
internal sealed class WasmImportLinkageAttribute : global::System.Attribute | ||
{ | ||
/// <summary> | ||
/// Instance constructor. | ||
/// </summary> | ||
public WasmImportLinkageAttribute() { } | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
.../EmbeddedResources/System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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.CompilerServices | ||
{ | ||
/// <summary> | ||
/// Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0. | ||
/// </summary> | ||
[global::System.AttributeUsage( | ||
global::System.AttributeTargets.Method | | ||
global::System.AttributeTargets.Constructor | | ||
global::System.AttributeTargets.Property, | ||
AllowMultiple = false, | ||
Inherited = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
internal sealed class OverloadResolutionPriorityAttribute : global::System.Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="global::System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute"/> class. | ||
/// </summary> | ||
/// <param name="priority">The priority of the attributed member. Higher numbers are prioritized, lower numbers are deprioritized. 0 is the default if no attribute is present.</param> | ||
public OverloadResolutionPriorityAttribute(int priority) | ||
{ | ||
Priority = priority; | ||
} | ||
|
||
/// <summary> | ||
/// The priority of the member. | ||
/// </summary> | ||
public int Priority { get; } | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...eGenerators/EmbeddedResources/System.Runtime.CompilerServices.ParamCollectionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// 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.CompilerServices | ||
{ | ||
/// <summary> | ||
/// Indicates that a method will allow a variable number of arguments in its invocation. | ||
/// </summary> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
internal sealed class ParamCollectionAttribute : global::System.Attribute | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters