/// <summary> /// Gets the methods from cache. /// </summary> /// <param name="type">The type.</param> /// <returns>Dictionary<System.String, MethodInfo>.</returns> public static Dictionary <string, MethodInfo> GetMethodsFromCache(this Type type) { #if NETFX_CORE return(ReflectInfoCache <MethodInfo> .GetCache(type, x => x.GetRuntimeMethods().ToArray())); #else return(ReflectInfoCache <MethodInfo> .GetCache(type, x => x.GetMethods())); #endif }
/// <summary> /// Gets the events from cache. /// </summary> /// <param name="type">The type.</param> /// <returns>Dictionary<System.String, EventInfo>.</returns> public static Dictionary <string, EventInfo> GetEventsFromCache(this Type type) { return(ReflectInfoCache <EventInfo> .GetCache(type, x => x.GetEvents())); }