public static ItemViewModel BuildItem(IHostService host, ItemViewModel item, FileModel model, Func <string, bool> filter = null) { var linkToUids = new HashSet <string>(); var pageViewModel = model.Content as PageViewModel; var skip = pageViewModel?.ShouldSkipMarkup; if (skip != true) { item.Summary = Markup(host, item.Summary, model, filter); item.Remarks = Markup(host, item.Remarks, model, filter); if (model.Type != DocumentType.Overwrite) { item.Conceptual = Markup(host, item.Conceptual, model, filter); } } linkToUids.UnionWith(item.Inheritance ?? EmptyEnumerable); linkToUids.UnionWith(item.DerivedClasses ?? EmptyEnumerable); linkToUids.UnionWith(item.InheritedMembers ?? EmptyEnumerable); linkToUids.UnionWith(item.Implements ?? EmptyEnumerable); linkToUids.UnionWith(item.SeeAlsos?.Where(s => s.LinkType == LinkType.CRef)?.Select(s => s.LinkId) ?? EmptyEnumerable); linkToUids.UnionWith(item.Sees?.Where(s => s.LinkType == LinkType.CRef)?.Select(s => s.LinkId) ?? EmptyEnumerable); if (item.Overridden != null) { linkToUids.Add(item.Overridden); } if (item.Syntax?.Return != null) { if (item.Syntax.Return.Description != null && skip != true) { item.Syntax.Return.Description = Markup(host, item.Syntax?.Return?.Description, model, filter); } linkToUids.UnionWith(item.Syntax.Return.Type ?? EmptyEnumerable); } var parameters = item.Syntax?.Parameters; if (parameters != null) { foreach (var parameter in parameters) { if (skip != true) { parameter.Description = Markup(host, parameter.Description, model, filter); } linkToUids.UnionWith(parameter.Type ?? EmptyEnumerable); } } if (item.Exceptions != null) { foreach (var exception in item.Exceptions) { if (skip != true) { exception.Description = Markup(host, exception.Description, model, filter); } linkToUids.Add(exception.Type); } } model.LinkToUids = model.LinkToUids.Union(linkToUids); return(item); }