예제 #1
0
 private void add_possible_type_attribute(TypeBuilder tb, ITypeSynonym type)
 {
     Type orig_type = get_type_reference_for_pascal_attributes(type.original_type);
     CustomAttributeBuilder cust_bldr = null;
     if (type.original_type is ICompiledTypeNode || type.original_type is IRefTypeNode && (type.original_type as IRefTypeNode).pointed_type is ICompiledTypeNode)
         cust_bldr = new CustomAttributeBuilder(this.TypeSynonimAttributeConstructor, new object[1] { orig_type });
     else
         cust_bldr = new CustomAttributeBuilder(this.TypeSynonimAttributeConstructor, new object[1] { orig_type.FullName });
     tb.SetCustomAttribute(cust_bldr);
 }
예제 #2
0
		public static string get_type_header(ITypeSynonym t)
		{
			StringBuilder sb = new StringBuilder();
			string hdr = HelpUtils.extract_user_defined_header(t.Documentation);
			if (!string.IsNullOrEmpty(hdr))
			{
				sb.Append("<div>"+hdr+"</div>");
				return sb.ToString();
			}
			sb.Append("<div>");
			sb.Append(get_span_for_keyword("type")+" "+get_span_for_identifier(t.name)+" = "+get_type_html_text(t.original_type));
			sb.Append("</div>");
			return sb.ToString();
		}
예제 #3
0
 private void CreateTypeSynonim(ITypeSynonym t)
 {
     TypeBuilder tb = mb.DefineType(cur_unit + ".%" + t.name, TypeAttributes.Public, TypeFactory.ObjectType);
     types.Add(tb);
     add_possible_type_attribute(tb, t);
 }
예제 #4
0
		public static string get_type_name(ITypeSynonym t)
		{
			return builder.parser.main_ns.namespace_name+"."+t.name;
		}