Skip to content

Commit

Permalink
Add polyfill for RequiresAssemblyFilesAttribute (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz authored May 23, 2024
1 parent 60900cd commit 335a384
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions PolyShim/Net60/RequiresAssemblyFilesAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#if (NETCOREAPP && !NET6_0_OR_GREATER) || (NETFRAMEWORK) || (NETSTANDARD)
#nullable enable
// ReSharper disable RedundantUsingDirective
// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable PartialTypeWithSinglePart

namespace System.Diagnostics.CodeAnalysis;

[AttributeUsage(
AttributeTargets.Constructor
| AttributeTargets.Event
| AttributeTargets.Method
| AttributeTargets.Property,
Inherited = false
)]
[ExcludeFromCodeCoverage]
internal class RequiresAssemblyFilesAttribute(string? message) : Attribute
{
public RequiresAssemblyFilesAttribute()
: this(null) { }

public string? Message { get; } = message;

public string? Url { get; init; }
}
#endif

0 comments on commit 335a384

Please sign in to comment.