/// <summary> /// Return the list of method from list of types /// </summary> /// <param name="type">type the declare methods</param> /// <param name="returnType">Not evaluated if null. method return type</param> /// <param name="parameters">Not evaluated if null. method arguments type</param> /// <returns></returns> public static IEnumerable <MethodInfo> GetMethods(this TypeDiscovery self, BindingFlags bindings, Type returnType, List <Type> parameters) { var types = self.GetTypes(c => c.IsPublic | c.IsClass); var _methods = GetMethods(types, bindings, returnType, parameters); return(_methods); }
public static TypeDiscovery Initialize(params string[] paths) { if (_instance == null) { lock (_lock) if (_instance == null) { _instance = new TypeDiscovery(paths); } else { _instance.AddDirectories(paths); } } else { _instance.AddDirectories(paths); } return(_instance); }