public ExternTypeRef GetTypeRef(string full_name, bool is_valuetype)
        {
            string first = full_name;
            string rest  = "";
            int    slash = full_name.IndexOf('/');

            if (slash > 0)
            {
                first = full_name.Substring(0, slash);
                rest  = full_name.Substring(slash + 1);
            }

            ExternTypeRef type_ref = typeref_table [first] as ExternTypeRef;

            if (type_ref != null)
            {
                if (is_valuetype && rest == "")
                {
                    type_ref.MakeValueClass();
                }
            }
            else
            {
                type_ref = new ExternTypeRef(this, first, is_valuetype);
                typeref_table [first] = type_ref;
            }

            return(rest == "" ? type_ref : type_ref.GetTypeRef(rest, is_valuetype));
        }
Example #2
0
        public ExternTypeRef GetTypeRef(string _name, bool is_valuetype)
        {
            string first = _name;
            string rest  = "";
            int    slash = _name.IndexOf('/');

            if (slash > 0)
            {
                first = _name.Substring(0, slash);
                rest  = _name.Substring(slash + 1);
            }

            ExternTypeRef ext_typeref = nestedtypes_table [first] as ExternTypeRef;

            if (ext_typeref != null)
            {
                if (is_valuetype && rest == "")
                {
                    ext_typeref.MakeValueClass();
                }
            }
            else
            {
                ext_typeref = new ExternTypeRef(this, first, is_valuetype);
                nestedtypes_table [first] = ext_typeref;
            }

            return(rest == "" ? ext_typeref : ext_typeref.GetTypeRef(rest, is_valuetype));
        }
Example #3
0
 public void MakeValueClass()
 {
     type_ref.MakeValueClass();
 }