Пример #1
0
 public void Execute(ReflectionTestMethods method)
 {
     if (!_actions.ContainsKey(method.ToString()))
     {
         throw new NotImplementedException(method.ToString());
     }
     _actions[method.ToString()]();
 }
Пример #2
0
    public void Execute(ReflectionTestMethods method)
    {
        MethodInfo methodInfo = GetType().GetMethod(method.ToString()
                                                    , BindingFlags.Instance | BindingFlags.NonPublic);

        if (methodInfo == null)
        {
            throw new NotImplementedException(method.ToString());
        }
        methodInfo.Invoke(this, null);
    }