File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,12 @@ internal static class ActivatorFactoryManager
99
1010 static ActivatorFactoryManager ( )
1111 {
12- Factory = GetFactory ( ) ;
13- }
14-
15- private static IActivatorFactory GetFactory ( )
16- {
17- switch ( ScriptingBackend . Current )
12+ Factory = ScriptingBackend . Current switch
1813 {
19- case ScriptingBackend . Backend . Mono : return new MonoActivatorFactory ( ) ;
20- case ScriptingBackend . Backend . IL2CPP : return new IL2CPPActivatorFactory ( ) ;
21- case ScriptingBackend . Backend . Undefined : throw new Exception ( "UndefinedRuntimeScriptingBackend" ) ;
22- default : throw new Exception ( $ "UnhandledRuntimeScriptingBackend { ScriptingBackend . Current } ") ;
23- }
14+ ScriptingBackend . Backend . Mono => new MonoActivatorFactory ( ) ,
15+ ScriptingBackend . Backend . IL2CPP => new IL2CPPActivatorFactory ( ) ,
16+ _ => throw new Exception ( $ "UnhandledRuntimeScriptingBackend { ScriptingBackend . Current } ")
17+ } ;
2418 }
2519 }
2620}
You can’t perform that action at this time.
0 commit comments