File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,15 +10,16 @@ internal static class TypeExtensions
1010 {
1111 internal static IEnumerable < MethodInfo > GetExtensionMethods ( this Type type )
1212 {
13- return type . Assembly . GetExportedTypes ( ) . Where ( x => ! x . IsGenericType && ! x . IsNested && x . IsSealed ) .
14- SelectMany ( x => x . GetMethods ( BindingFlags . Static | BindingFlags . Public ) ) . Where ( x => x . IsDefined ( typeof ( ExtensionAttribute ) , false ) ) .
15- Where ( x => x . GetParameters ( ) [ 0 ] . ParameterType == type ) ;
13+ return type . Assembly . GetExportedTypes ( ) . Where ( x => ! x . IsGenericType && ! x . IsNested && x . IsSealed )
14+ . SelectMany ( x => x . GetMethods ( BindingFlags . Static | BindingFlags . Public ) )
15+ . Where ( x => x . IsDefined ( typeof ( ExtensionAttribute ) , false ) )
16+ . Where ( x => x . GetParameters ( ) [ 0 ] . ParameterType == type ) ;
1617 }
1718
1819 internal static IEnumerable < MethodInfo > GetAllMethods ( this Type type )
1920 {
20- return type . GetMethods ( BindingFlags . Instance | BindingFlags . Public | BindingFlags . DeclaredOnly ) .
21- Where ( m => ! m . IsSpecialName ) . Union ( type . GetExtensionMethods ( ) ) . OrderBy ( x => x . Name ) ;
21+ return type . GetMethods ( BindingFlags . Instance | BindingFlags . Public | BindingFlags . DeclaredOnly )
22+ . Where ( m => ! m . IsSpecialName ) . Union ( type . GetExtensionMethods ( ) ) . OrderBy ( x => x . Name ) ;
2223 }
2324 }
2425}
Original file line number Diff line number Diff line change 77
88namespace ScriptCs . Hosting
99{
10-
1110 public class ScriptServicesBuilder : ServiceOverrides < IScriptServicesBuilder > , IScriptServicesBuilder
1211 {
1312 private readonly ITypeResolver _typeResolver ;
You can’t perform that action at this time.
0 commit comments