mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
28 lines
917 B
C#
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; }
|
|
}
|