using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace CallerInfoAttributes
{
    class Example10
    {
        // Listing 15-10
        public static void Log(
            string message,
            [CallerMemberName] string callingMethod = "",
            [CallerFilePath] string callingFile = "",
            [CallerLineNumber] int callingLineNumber = 0)
        {
            Console.WriteLine("Komunikat {0}, wywołanie z {1} w pliku '{2}', numer wiersza {3}",
                message, callingMethod, callingFile, callingLineNumber);
        }
    }
}
