C# Class IronRuby.Runtime.Calls.MemberGroupBuilder

Show file Open project: ExpertsInside/IronSP

Private Methods

Method Description
AddMethodsOverwriteExisting ( MemberInfo newOverloads, RubyMethodGroupInfo overloadOwners ) : bool
GetDeclaredClrMethods ( Type type, BindingFlags bindingFlags, string name ) : System.Reflection.MemberInfo[]
GetVisibleMethodCount ( MemberInfo members ) : int
IsVisible ( MethodBase method ) : bool
MakeAllMethodsGroup ( RubyClass cls ) : RubyMethodGroupInfo
MakeSingleOwnerGroup ( RubyClass cls, MemberInfo members, int visibleMemberCount ) : RubyMethodGroupInfo
MemberGroupBuilder ( bool specialNameOnly ) : System
TryGetClrMethod ( RubyClass cls, Type type, BindingFlags bindingFlags, string name, string clrName, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

There are basically 4 cases: 1) CLR method of the given name is not defined in the specified type. Do nothing, the method will be found as we traverse the hierarhy towards the Kernel module. 2) Otherwise 1) There is no RubyMemberInfo of given name present in the (type..Kernel] ancestors. We need to search all types in (type..Object] for CLR method overloads. 2) There is a RubyMemberInfo in a class, say C, in (type..Kernel]. We need to get CLR methods from (type..C) in addition to the members in the type. 1) C.HidesInheritedOverloads == true All overloads of the method we look for are in [type..C). 2) C.HidesInheritedOverloads == false All overloads of the method we look for are in [type..C) and in the RubyMemberInfo.