private void WriteCompiledProperty(compiled_property_node cpn)
 {
     bw.Write(GetCompiledProperty(cpn));
 }
		public SymbolInfo(compiled_property_node value)
		{
			//_name_information_type=name_information_type.nit_compiled_property;
			_sym_info=value;
			_access_level=get_class_member_access_level(value);
			_symbol_kind=symbol_kind.sk_none;
		}
 //получение ссылки на откомпилированное свойство
 private int GetCompiledProperty(compiled_property_node cpn)
 {
     ImportedEntity ie = null;
     if (ext_members.TryGetValue(cpn, out ie))
     {
         return ie.index * ie.GetSize();
     }
     ie = new ImportedEntity();
     ie.flag = ImportKind.DotNet;
     ie.num_unit = GetCompiledTypeReference(cpn.compiled_comprehensive_type);
     //ie.offset = (int)ccn.constructor_info.MetadataToken;
     ie.offset = GetTokenForNetEntity(cpn.property_info);
     int offset = imp_entitles.Count * ie.GetSize();
     ie.index = imp_entitles.Count;
     imp_entitles.Add(ie);
     ext_members[cpn] = ie;
     return offset;
 }
示例#4
0
		/*
		public static compiled_function_node GetMethodNode(MethodInfo mi)
		{
			compiled_function_node cfn = (compiled_function_node)meth_nodes[mi];
			if (cfn != null) return cfn;
			cfn = new compiled_function_node(mi);
			meth_nodes[mi] = cfn;
			return cfn;
		}
		*/

		public static compiled_property_node GetPropertyNode(PropertyInfo pi)
		{
            compiled_property_node cpn = null;
            if (prop_nodes.TryGetValue(pi, out cpn))
                return cpn;
			cpn = new compiled_property_node(pi);
			
			prop_nodes[pi] = cpn;
			return cpn;
		}