public static IHtmlString FieldName(this ApiServices context, DocumentedField field) { if (field != null) { return(MvcHtmlString.Create(field.Definition.Name)); } return(MvcHtmlString.Create(string.Empty)); }
public void Text_PlotFields_AllHaveSummaries() { foreach (FieldInfo info in ScottPlot.Cookbook.Locate.GetPlotFields()) { var f = new DocumentedField(info, LoadedXmlDocument); Assert.IsNotNull(f.Summary); } }
protected void AddDetailedInfo(DocumentedField f) { AddHeading(f.Name, 3); if (!string.IsNullOrWhiteSpace(f.Summary)) { Add($"**Summary:** {f.Summary}"); } Add($"**Name:** `{f.FullName}`"); Add($"**Type:** `{f.Type}`"); }
protected string OneLineInfo(DocumentedField field, string baseUrl) { string url = Sanitize(field.Name); StringBuilder sb = new StringBuilder(); sb.Append($"<a href='{baseUrl}#{url}'><strong>{field.Name}</strong></a>"); if (!string.IsNullOrWhiteSpace(field.Summary)) { sb.Append(" - " + field.Summary); } return(sb.ToString()); }
static void MatchField(List <IDocumentationMember> members, XmlNode node) { var member = IdentifierFor.XmlString(node.Attributes["name"].Value); for (int i = 0; i < members.Count; i++) { var reflected = members[i] as ReflectedField; if (reflected != null && reflected.Match(member)) { members[i] = new DocumentedField(reflected.Name, node, reflected.Field, reflected.TargetType); } } }
private void ParseField(List <IDocumentationMember> members, XmlNode node) { var member = Identifier.FromString(node.Attributes["name"].Value); for (int i = 0; i < members.Count; i++) { var eventMember = members[i] as UndocumentedField; if (eventMember != null && eventMember.Match(member)) { members[i] = new DocumentedField(member, node, eventMember.Field, eventMember.TargetType); } } }
public void Add(List <Namespace> namespaces, DocumentedField association) { if (association.Field == null) { return; } var ns = FindNamespace(association, namespaces); var type = FindType(ns, association); var returnType = DeclaredType.Unresolved(Identifier.FromType(association.Field.FieldType), association.Field.FieldType, Namespace.Unresolved( Identifier.FromNamespace(association.Field.FieldType.Namespace))); var doc = Field.Unresolved(Identifier.FromField(association.Field, association.TargetType), type, returnType); ParseSummary(association, doc); ParseRemarks(association, doc); ParseExample(association, doc); matchedAssociations[association.Name] = doc; type.AddField(doc); }