コード例 #1
0
            /// <summary>
            /// Gets the methods from cache.
            /// </summary>
            /// <param name="type">The type.</param>
            /// <returns>Dictionary&lt;System.String, MethodInfo&gt;.</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
            }
コード例 #2
0
 /// <summary>
 /// Gets the events from cache.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns>Dictionary&lt;System.String, EventInfo&gt;.</returns>
 public static Dictionary <string, EventInfo> GetEventsFromCache(this Type type)
 {
     return(ReflectInfoCache <EventInfo> .GetCache(type, x => x.GetEvents()));
 }