예제 #1
0
        public static HlMemberDefinition RecursiveGetPublicMember(HlTypeDefinition start, int current, string[] parts)
        {
            HlMemberDefinition ret = start.GetPublicMember(parts[current]);

            if (current == parts.Length - 1)
            {
                return(ret);
            }

            return(RecursiveGetPublicMember(
                       start.GetType(start.GetPublicMember(parts[current])),
                       current + 1,
                       parts
                       ));
        }
예제 #2
0
        public HlMemberDefinition GetPublicMember(string memberName)
        {
            HlMemberDefinition ret = m_Members.FirstOrDefault(x => x.IsPublic && x.Name == memberName);

            if (ret == null)
            {
                HlTypeDefinition def = m_Types.FirstOrDefault(x => x.HasMember(memberName));

                if (def != null)
                {
                    return(def.GetPublicMember(memberName));
                }

                EventManager <ErrorEvent> .SendEvent(new HlMemberNotFoundEvent( this, memberName ));
            }

            return(ret);
        }