1 2 3 4 5 6 7 8 9 10
using System.Runtime.CompilerServices; namespace MatrixRoomUtils.Core.Attributes; [AttributeUsage(AttributeTargets.All)] public class TraceAttribute : Attribute { public TraceAttribute([CallerMemberName] string callerName = "") { Console.WriteLine($"{callerName} called!"); } }