forked from HangfireIO/Hangfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static callbacks and record contexts for CoreBackgroundJobFactory
- Loading branch information
Showing
2 changed files
with
84 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System.ComponentModel; | ||
|
||
namespace System.Runtime.CompilerServices | ||
{ | ||
#if !NET5_0_OR_GREATER | ||
|
||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
internal static class IsExternalInit {} | ||
|
||
#endif // !NET5_0_OR_GREATER | ||
|
||
#if !NET7_0_OR_GREATER | ||
|
||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | ||
internal sealed class RequiredMemberAttribute : Attribute {} | ||
|
||
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] | ||
internal sealed class CompilerFeatureRequiredAttribute : Attribute | ||
{ | ||
public CompilerFeatureRequiredAttribute(string featureName) | ||
{ | ||
FeatureName = featureName; | ||
} | ||
|
||
public string FeatureName { get; } | ||
public bool IsOptional { get; init; } | ||
|
||
public const string RefStructs = nameof(RefStructs); | ||
public const string RequiredMembers = nameof(RequiredMembers); | ||
} | ||
|
||
#endif // !NET7_0_OR_GREATER | ||
} | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
#if !NET7_0_OR_GREATER | ||
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] | ||
internal sealed class SetsRequiredMembersAttribute : Attribute {} | ||
#endif | ||
} |