Exemplo n.º 1
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out TypeForwarderHandle handle)
        {
            uint value;

            offset = reader.DecodeUnsigned(offset, out value);
            handle = new TypeForwarderHandle((int)value);
            handle._Validate();
            return(offset);
        } // Read
Exemplo n.º 2
0
        private MetadataType ResolveExportedType(TypeForwarderHandle handle)
        {
            TypeForwarder typeForwarder = _metadataReader.GetTypeForwarder(handle);

            var module = GetModule(typeForwarder.Scope);

            string fullname     = _metadataReader.GetString(typeForwarder.Name);
            int    lastDotIndex = fullname.LastIndexOf('.');
            string nameSpace    = null;
            string name         = fullname;

            if (lastDotIndex != -1)
            {
                nameSpace = fullname.Substring(0, lastDotIndex);
                name      = fullname.Substring(lastDotIndex + 1);
            }

            return(module.GetType(nameSpace, name));
        }