/// <summary> /// Get a list of methods in the view model that we can bind to. /// </summary> private MethodInfo[] GetBindableViewModelMethods(EventBinding targetScript) { return(targetScript.GetAvailableViewModelTypes() .SelectMany(type => type.GetMethods(BindingFlags.Public | BindingFlags.Instance)) .Where(m => m.GetCustomAttributes(typeof(BindingAttribute), false).Any() && !m.Name.StartsWith("get_")) // Exclude property getters, since we aren't doing anything with the return value of the bound method anyway. .ToArray()); }