/// <summary> /// Gets all configured instances of type T using explicitly configured arguments from the "args" /// </summary> /// <param name="type"></param> /// <param name="args"></param> /// <returns></returns> public IList GetAllInstances(Type type, ExplicitArguments args) { BuildSession session = withNewSession(Plugin.DEFAULT); args.RegisterDefaults(session); Array instances = session.CreateInstanceArray(type, null); return(new ArrayList(instances)); }
private IList <T> getListOfTypeWithSession <T>(BuildSession session) { var list = new List <T>(); foreach (T instance in session.CreateInstanceArray(typeof(T), null)) { list.Add(instance); } return(list); }