//добавление поля public FldInfo AddField(ICommonClassFieldNode f, FieldInfo fb) { FldInfo fi = new FldInfo(fb); defs[f] = fi; return(fi); }
public FldInfo AddGenericField(ICommonClassFieldNode f, FieldInfo fb, Type field_type) { FldInfo fi = new GenericFldInfo(fb, field_type); defs[f] = fi; return(fi); }
//получение поля public FldInfo GetField(ICommonClassFieldNode f) { /*if (f.name == "XYZW") * { * var y = f.GetHashCode(); * } */ return((FldInfo)defs[f]); }
public FldInfo AddGenericField(ICommonClassFieldNode f, FieldInfo fb, Type field_type) { FldInfo fi = new GenericFldInfo(fb, field_type); /*if (f.name == "XYZW") * { * var y = f.GetHashCode(); * } */ defs[f] = fi; return(fi); }
//добавление поля public FldInfo AddField(ICommonClassFieldNode f, FieldInfo fb) { FldInfo fi = new FldInfo(fb); /*if (f.name == "XYZW") * { * var y = f.GetHashCode(); * } */ defs[f] = fi; return(fi); }
public FldInfo AddGenericField(ICommonClassFieldNode f, FieldInfo fb, Type field_type, FieldInfo prev_fi) { FldInfo fi = new GenericFldInfo(fb, field_type, prev_fi); // prev_fi - чтобы сконструировать на последнем этапе fi #if DEBUG /*if (f.name == "XYZW") * { * var y = f.GetHashCode(); * }*/ #endif defs[f] = fi; return(fi); }
//получение поля public FldInfo GetField(ICommonClassFieldNode f) { var r = (FldInfo)defs[f]; #if DEBUG /*if (f.name == "XYZW") * { * var y = f.GetHashCode(); * } */ #endif #if DEBUG /*if (r == null && f.name == "XYZW") * { * foreach (var k in defs.Keys) * { * if ((k is ICommonClassFieldNode) && (k as ICommonClassFieldNode).name == "XYZW") * return (FldInfo)defs[k]; * } * } */ #endif return(r); }
//получение поля public FldInfo GetField(ICommonClassFieldNode f) { return((FldInfo)defs[f]); }
public void visit(ICommonClassFieldNode value) { throw new System.NotSupportedException(value.GetType().ToString()); }
public static string get_field_name(ICommonClassFieldNode f) { return get_type_name(f.comperehensive_type) + "." + f.name; }
//получение поля public FldInfo GetField(ICommonClassFieldNode f) { return (FldInfo)defs[f]; }
public virtual void visit(ICommonClassFieldNode value) { }
public FldInfo AddGenericField(ICommonClassFieldNode f, FieldInfo fb, Type field_type) { FldInfo fi = new GenericFldInfo(fb, field_type); defs[f] = fi; return fi; }
//добавление поля public FldInfo AddField(ICommonClassFieldNode f, FieldInfo fb) { FldInfo fi = new FldInfo(fb); defs[f] = fi; return fi; }
public static bool can_write(ICommonClassFieldNode t) { return !(string.IsNullOrEmpty(t.Documentation) && !builder.options.ShowNoCommentedElements || t.name.Contains("$") || user_doc_disabled(t.Documentation)); }
public void visit(ICommonClassFieldNode value) { string s = value.GetType().Name + "."; prepare_string_node(value.name, s + "name"); //prepare_node(value.comperehensive_type, s + "comperehensive_type"); //prepare_node(value.comprehensive_type, s + "comprehensive_type"); prepare_up_link_node(value.comperehensive_type.name.ToString(), s + "comperehensive_type", value.comperehensive_type); myTreeNode from = treeView.SelectedNode.Nodes[1] as myTreeNode; myTreeNode to = table_subnodes[value.comperehensive_type] as myTreeNode; table_for_up_links.Add(from, to); prepare_string_node(value.field_access_level.ToString(), s + "field_access_level"); prepare_node(value.inital_value, s + "initial_value"); prepare_string_node(value.node_location_kind.ToString(), s + "node_location_kind"); prepare_string_node(value.polymorphic_state.ToString(), s + "polymorphic_state"); prepare_node(value.type, s + "type"); }
private void MakeAttribute(ICommonClassFieldNode fld) { FieldBuilder fb = (FieldBuilder)helper.GetField(fld).fi; IAttributeNode[] attrs = fld.Attributes; for (int i = 0; i < attrs.Length; i++) { CustomAttributeBuilder cab = new CustomAttributeBuilder ((attrs[i].AttributeConstructor is ICompiledConstructorNode) ? (attrs[i].AttributeConstructor as ICompiledConstructorNode).constructor_info : helper.GetConstructor(attrs[i].AttributeConstructor).cnstr, get_constants(attrs[i].Arguments), get_named_properties(attrs[i].PropertyNames), get_constants(attrs[i].PropertyInitializers), get_named_fields(attrs[i].FieldNames), get_constants(attrs[i].FieldInitializers)); fb.SetCustomAttribute(cab); } }
public static string get_field_header(ICommonClassFieldNode f) { StringBuilder sb = new StringBuilder(); string hdr = HelpUtils.extract_user_defined_header(f.Documentation); if (!string.IsNullOrEmpty(hdr)) { sb.Append("<div>"+hdr+"</div>"); return sb.ToString(); } sb.Append("<div>"); sb.Append(get_span_for_keyword(get_text_for_access_level(f.field_access_level))+" "); if (f.polymorphic_state == polymorphic_state.ps_static) sb.Append(get_span_for_keyword("class")+" "); sb.Append(get_span_for_identifier(f.name)); sb.Append(" : "+get_type_html_text(f.type)); sb.Append("</div>"); return sb.ToString(); }