Merge consecutive Where calls
This commit is contained in:
parent
4d465a4a58
commit
f060bc1211
|
@ -20,18 +20,18 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var apis = Assembly
|
var apis = Assembly
|
||||||
.Load("BizHawk.Client.ApiHawk")
|
.Load("BizHawk.Client.ApiHawk")
|
||||||
.GetTypes()
|
.GetTypes()
|
||||||
.Where(t => typeof(IExternalApi).IsAssignableFrom(t))
|
.Where(t => typeof(IExternalApi).IsAssignableFrom(t)
|
||||||
.Where(t => t.IsSealed)
|
&& t.IsSealed
|
||||||
.Where(t => ServiceInjector.IsAvailable(serviceProvider, t))
|
&& ServiceInjector.IsAvailable(serviceProvider, t))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
apis.AddRange(
|
apis.AddRange(
|
||||||
Assembly
|
Assembly
|
||||||
.GetAssembly(typeof(ApiContainer))
|
.GetAssembly(typeof(ApiContainer))
|
||||||
.GetTypes()
|
.GetTypes()
|
||||||
.Where(t => typeof(IExternalApi).IsAssignableFrom(t))
|
.Where(t => typeof(IExternalApi).IsAssignableFrom(t)
|
||||||
.Where(t => t.IsSealed)
|
&& t.IsSealed
|
||||||
.Where(t => ServiceInjector.IsAvailable(serviceProvider, t)));
|
&& ServiceInjector.IsAvailable(serviceProvider, t)));
|
||||||
|
|
||||||
foreach (var api in apis)
|
foreach (var api in apis)
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,8 +44,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
foreach (var core in Assembly.Load("BizHawk.Emulation.Cores").GetTypes()
|
foreach (var core in Assembly.Load("BizHawk.Emulation.Cores").GetTypes()
|
||||||
.Where(t => typeof(IEmulator).IsAssignableFrom(t))
|
.Where(t => typeof(IEmulator).IsAssignableFrom(t))
|
||||||
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttribute>().FirstOrDefault())
|
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttribute>().FirstOrDefault())
|
||||||
.Where(a => a != null)
|
.Where(a => a != null && a.Released)
|
||||||
.Where(a => a.Released)
|
|
||||||
.OrderByDescending(a => a.CoreName.ToLower()))
|
.OrderByDescending(a => a.CoreName.ToLower()))
|
||||||
{
|
{
|
||||||
CoreInfoPanel.Controls.Add(new BizBoxInfoControl(core)
|
CoreInfoPanel.Controls.Add(new BizBoxInfoControl(core)
|
||||||
|
|
Loading…
Reference in New Issue