aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/ReflectionHelper.cs
blob: 16d68bb1a92db02266ad7da138563f2bdeb8bdd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Linq;
using System.Reflection;

namespace TimelineApp.Tests.Helpers
{
    public static class ReflectionHelper
    {
        public static ParameterInfo GetParameter(this MethodInfo methodInfo, string name)
        {
            return methodInfo.GetParameters().Where(p => p.Name == name).Single();
        }
    }
}