This commit is contained in:
bbradson
2022-10-24 18:56:18 +02:00
parent 01ef055ff2
commit 9cdc8ccb4f
70 changed files with 19754 additions and 4 deletions
@@ -0,0 +1,24 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Runtime.CompilerServices;
/// <summary>
/// An attribute that allows parameters to receive the expression of other parameters.
/// </summary>
/// <remarks>Internal copy from the BCL attribute.</remarks>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
internal sealed class CallerArgumentExpressionAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="CallerArgumentExpressionAttribute"/> class.
/// </summary>
/// <param name="parameterName">The condition parameter value.</param>
public CallerArgumentExpressionAttribute(string parameterName) => ParameterName = parameterName;
/// <summary>
/// Gets the parameter name the expression is retrieved from.
/// </summary>
public string ParameterName { get; }
}