Antaris.AspNetCore.Mvc.Widgets.Internal.WidgetMethodSelector.GetMethod C# (CSharp) Method

GetMethod() private static method

Gets the method for the given name.
private static GetMethod ( string name, TypeInfo widgetType ) : MethodInfo
name string The method name.
widgetType System.Reflection.TypeInfo The widget type.
return System.Reflection.MethodInfo
        private static MethodInfo GetMethod(string name, TypeInfo widgetType)
        {
#if NET451
            return widgetType.AsType().GetMethod(name, BindingFlags.Public | BindingFlags.Instance);
#else
            var method = widgetType.AsType().GetMethod(name);
            return method != null && method.IsStatic ? null : method;
#endif
        }