using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Fody.MethodDecoratorDemo
{
    public class Program
    {
        
        static void Main(string[] args)
        {
            TextWriterTraceListener myWriter = new TextWriterTraceListener(System.Console.Out);
            Trace.Listeners.Add(myWriter);
            var tested = new TestedClass();
            tested.Method();
            tested.Method2();
        }
    }

    public class TestedClass
    {
        [Interceptor]
        public void Method()
        {
            Console.WriteLine("In method1");
            //throw new ArgumentNullException("exception");
        }
        
        public void Method2()
        {
            Console.WriteLine("In method2");
        }
    }
}
