From 258b01886ec50c946e4c49bcede211852784286d Mon Sep 17 00:00:00 2001 From: dahall Date: Thu, 10 Sep 2020 10:13:17 -0600 Subject: [PATCH] Added CallerXXAttribute classes missing from .NET 2-4 so that current compliers can be spoofed to pull that information. --- ....CompilerServices.CallerXXAttribute.PreNet45.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Core/BkwdComp/System.Runtime.CompilerServices.CallerXXAttribute.PreNet45.cs diff --git a/Core/BkwdComp/System.Runtime.CompilerServices.CallerXXAttribute.PreNet45.cs b/Core/BkwdComp/System.Runtime.CompilerServices.CallerXXAttribute.PreNet45.cs new file mode 100644 index 00000000..165dd4f8 --- /dev/null +++ b/Core/BkwdComp/System.Runtime.CompilerServices.CallerXXAttribute.PreNet45.cs @@ -0,0 +1,27 @@ +#if (NET20 || NET35 || NET40) +namespace System.Runtime.CompilerServices +{ + /// + /// 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. + /// + /// + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] + public class CallerFilePathAttribute : Attribute + { + } + + /// Allows you to obtain the line number in the source file at which the method is called. + /// + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] + public class CallerLineNumberAttribute : Attribute + { + } + + /// Allows you to obtain the method or property name of the caller to the method. + /// + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] + public class CallerMemberNameAttribute : Attribute + { + } +} +#endif \ No newline at end of file