Beispiel #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
                       ));
        }
Beispiel #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
                       ));
        }