@@ -20,21 +20,21 @@ public static class PluginsLoader
20
20
21
21
public static List < PluginPair > Plugins ( List < PluginMetadata > metadatas , PluginsSettings settings )
22
22
{
23
- var csharpPlugins = CSharpPlugins ( metadatas ) . ToList ( ) ;
23
+ var dotnetPlugins = DotNetPlugins ( metadatas ) . ToList ( ) ;
24
24
var pythonPlugins = PythonPlugins ( metadatas , settings . PythonDirectory ) ;
25
25
var executablePlugins = ExecutablePlugins ( metadatas ) ;
26
- var plugins = csharpPlugins . Concat ( pythonPlugins ) . Concat ( executablePlugins ) . ToList ( ) ;
26
+ var plugins = dotnetPlugins . Concat ( pythonPlugins ) . Concat ( executablePlugins ) . ToList ( ) ;
27
27
return plugins ;
28
28
}
29
29
30
- public static IEnumerable < PluginPair > CSharpPlugins ( List < PluginMetadata > source )
30
+ public static IEnumerable < PluginPair > DotNetPlugins ( List < PluginMetadata > source )
31
31
{
32
32
var plugins = new List < PluginPair > ( ) ;
33
- var metadatas = source . Where ( o => o . Language . ToUpper ( ) == AllowedLanguage . CSharp ) ;
33
+ var metadatas = source . Where ( o => AllowedLanguage . IsDotNet ( o . Language ) ) ;
34
34
35
35
foreach ( var metadata in metadatas )
36
36
{
37
- var milliseconds = Stopwatch . Debug ( $ "|PluginsLoader.CSharpPlugins |Constructor init cost for { metadata . Name } ", ( ) =>
37
+ var milliseconds = Stopwatch . Debug ( $ "|PluginsLoader.DotNetPlugins |Constructor init cost for { metadata . Name } ", ( ) =>
38
38
{
39
39
40
40
#if DEBUG
@@ -50,7 +50,7 @@ public static IEnumerable<PluginPair> CSharpPlugins(List<PluginMetadata> source)
50
50
}
51
51
catch ( Exception e )
52
52
{
53
- Log . Exception ( $ "|PluginsLoader.CSharpPlugins |Couldn't load assembly for { metadata . Name } ", e ) ;
53
+ Log . Exception ( $ "|PluginsLoader.DotNetPlugins |Couldn't load assembly for { metadata . Name } ", e ) ;
54
54
return ;
55
55
}
56
56
var types = assembly . GetTypes ( ) ;
@@ -61,7 +61,7 @@ public static IEnumerable<PluginPair> CSharpPlugins(List<PluginMetadata> source)
61
61
}
62
62
catch ( InvalidOperationException e )
63
63
{
64
- Log . Exception ( $ "|PluginsLoader.CSharpPlugins |Can't find class implement IPlugin for <{ metadata . Name } >", e ) ;
64
+ Log . Exception ( $ "|PluginsLoader.DotNetPlugins |Can't find class implement IPlugin for <{ metadata . Name } >", e ) ;
65
65
return ;
66
66
}
67
67
IPlugin plugin ;
@@ -71,7 +71,7 @@ public static IEnumerable<PluginPair> CSharpPlugins(List<PluginMetadata> source)
71
71
}
72
72
catch ( Exception e )
73
73
{
74
- Log . Exception ( $ "|PluginsLoader.CSharpPlugins |Can't create instance for <{ metadata . Name } >", e ) ;
74
+ Log . Exception ( $ "|PluginsLoader.DotNetPlugins |Can't create instance for <{ metadata . Name } >", e ) ;
75
75
return ;
76
76
}
77
77
#endif
0 commit comments