-
-
Notifications
You must be signed in to change notification settings - Fork 52
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 #114 from Sergio0694/dev/constant-expected-attribute
Add [ConstantExpected] polyfill
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
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
30 changes: 30 additions & 0 deletions
30
...Generators/EmbeddedResources/System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute.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,30 @@ | ||
// <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 method parameter expects a constant. | ||
/// </summary> | ||
/// <remarks> | ||
/// This can be used to inform tooling that a constant should be used as an argument for the annotated parameter. | ||
/// </remarks> | ||
[global::System.AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
internal sealed class ConstantExpectedAttribute : global::System.Attribute | ||
{ | ||
/// <summary> | ||
/// Indicates the minimum bound of the expected constant, inclusive. | ||
/// </summary> | ||
public object? Min { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates the maximum bound of the expected constant, inclusive. | ||
/// </summary> | ||
public object? Max { get; set; } | ||
} | ||
} |
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