File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
src/Bonsai.Scripting.Expressions Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public static ParsingConfig CreateParsingConfig(params Type[] additionalTypes)
1717
1818 static IDynamicLinqCustomTypeProvider CreateCustomTypeProvider ( ParsingConfig config , params Type [ ] additionalTypes )
1919 {
20- return new DefaultDynamicLinqCustomTypeProvider (
20+ return new SimpleDynamicLinqCustomTypeProvider (
2121 config ,
2222 additionalTypes . SelectMany ( EnumerateTypeHierarchy ) . ToList ( ) ) ;
2323 }
@@ -36,5 +36,21 @@ static IEnumerable<Type> EnumerateTypeHierarchy(Type type)
3636 type = type . BaseType ;
3737 }
3838 }
39+
40+ class SimpleDynamicLinqCustomTypeProvider : DefaultDynamicLinqCustomTypeProvider
41+ {
42+ readonly HashSet < Type > customTypes ;
43+
44+ public SimpleDynamicLinqCustomTypeProvider ( ParsingConfig config , IList < Type > additionalTypes )
45+ : base ( config , additionalTypes , cacheCustomTypes : false )
46+ {
47+ customTypes = new ( AdditionalTypes ) ;
48+ }
49+
50+ public override HashSet < Type > GetCustomTypes ( )
51+ {
52+ return customTypes ;
53+ }
54+ }
3955 }
4056}
You can’t perform that action at this time.
0 commit comments