Added CallerXXAttribute classes missing from .NET 2-4 so that current compliers can be spoofed to pull that information.

pull/180/head
dahall 2020-09-10 10:13:17 -06:00
parent dabe7bcd84
commit 258b01886e
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#if (NET20 || NET35 || NET40)
namespace System.Runtime.CompilerServices
{
/// <summary>
/// Allows you to obtain the full path of the source file that contains the caller. This is the file path at the time of compile.
/// </summary>
/// <seealso cref="System.Attribute"/>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public class CallerFilePathAttribute : Attribute
{
}
/// <summary>Allows you to obtain the line number in the source file at which the method is called.</summary>
/// <seealso cref="System.Attribute"/>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public class CallerLineNumberAttribute : Attribute
{
}
/// <summary>Allows you to obtain the method or property name of the caller to the method.</summary>
/// <seealso cref="System.Attribute"/>
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public class CallerMemberNameAttribute : Attribute
{
}
}
#endif