Exemplo n.º 1
0
        public static HlMemberDefinition RecursiveGetPrivateOrPublicMember(
            HlTypeDefinition start,
            int current,
            string[] parts)
        {
            HlMemberDefinition ret = start.GetPrivateOrPublicMember(parts[current]);

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

            return(RecursiveGetPrivateOrPublicMember(
                       start.GetType(start.GetPrivateOrPublicMember(parts[current])),
                       current + 1,
                       parts
                       ));
        }
Exemplo n.º 2
0
        public static uint RecursiveGetOffset(HlTypeDefinition start, uint value, int current, string[] parts)
        {
            uint ret = value + start.GetOffset(parts[current]);

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

            return(RecursiveGetOffset(
                       start.GetType(start.GetPrivateOrPublicMember(parts[current])),
                       ret,
                       current + 1,
                       parts
                       ));
        }
Exemplo n.º 3
0
        public HlMemberDefinition GetPrivateOrPublicMember(string memberName)
        {
            HlMemberDefinition ret = m_Members.FirstOrDefault(x => x.Name == memberName);

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

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

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

            return(ret);
        }