Files
agent-framework/dotnet/src/LegacySupport/CallerAttributes/CallerArgumentExpressionAttribute.cs
T

28 lines
917 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Diagnostics.CodeAnalysis;
namespace System.Runtime.CompilerServices;
/// <summary>
/// Tags parameter that should be filled with specific caller name.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CallerArgumentExpressionAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="CallerArgumentExpressionAttribute"/> class.
/// </summary>
/// <param name="parameterName">Function parameter to take the name from.</param>
public CallerArgumentExpressionAttribute(string parameterName)
{
this.ParameterName = parameterName;
}
/// <summary>
/// Gets name of the function parameter that name should be taken from.
/// </summary>
public string ParameterName { get; }
}