public void Add( List<Namespace> namespaces, DocumentedType association ) { try { if( null != namespaces && null != association ) { var ns = FindNamespace( association, namespaces ); if( null != ns ) { DeclaredType doc = DeclaredType.Unresolved( (TypeIdentifier) association.Name, association.TargetType, ns ); if( null != doc ) { ParseSummary( association, doc ); ParseRemarks( association, doc ); ParseValue( association, doc ); ParseExample( association, doc ); if( matchedAssociations.ContainsKey( association.Name ) ) return; matchedAssociations.Add( association.Name, doc ); ns.AddType( doc ); } } } } catch( Exception ) { } }
private void ParseType(IList<IDocumentationMember> members, XmlNode node) { Identifier member = Identifier.FromString(node.Attributes["name"].Value); for (int i = 0; i < members.Count; i++) { var typeMember = members[i] as UndocumentedType; if (typeMember != null && typeMember.Match(member)) members[i] = new DocumentedType(member, node, typeMember.Type); } }
public void Add(List<Namespace> namespaces, DocumentedType association) { var ns = FindNamespace(association, namespaces); DeclaredType doc = DeclaredType.Unresolved((TypeIdentifier)association.Name, association.TargetType, ns); ParseSummary(association, doc); ParseRemarks(association, doc); ParseValue(association, doc); if (matchedAssociations.ContainsKey(association.Name)) return; // weird case when a type has the same method declared twice matchedAssociations.Add(association.Name, doc); ns.AddType(doc); }
public void Add(List<Namespace> namespaces, DocumentedType association) { Namespace ns = this.FindNamespace(association, namespaces); DeclaredType doc = DeclaredType.Unresolved((TypeIdentifier)association.Name, association.TargetType, ns); this.ParseSummary(association, doc); this.ParseRemarks(association, doc); this.ParseValue(association, doc); this.ParseExample(association, doc); if (this.matchedAssociations.ContainsKey(association.Name)) { return; } this.matchedAssociations.Add(association.Name, doc); ns.AddType(doc); }
static void MatchType(List<IDocumentationMember> members, XmlNode node) { var identifier = IdentifierFor.XmlString(node.Attributes["name"].Value); var positionOfUndocumentedType = members.FindIndex(m => { var reflected = m as ReflectedType; return reflected != null && reflected.Match(identifier); }); if (positionOfUndocumentedType >= 0) { members[positionOfUndocumentedType] = new DocumentedType(identifier, node, members[positionOfUndocumentedType].TargetType); } }
private void ParseType(List<IDocumentationMember> members, XmlNode node) { var identifier = Identifier.FromString(node.Attributes["name"].Value); var positionOfUndocumentedType = members.FindIndex(m => { var typeMember = m as UndocumentedType; return typeMember != null && typeMember.Match(identifier); }); if (positionOfUndocumentedType >= 0) { members[positionOfUndocumentedType] = new DocumentedType(identifier, node, members[positionOfUndocumentedType].TargetType); } }
private void AddType(List<Namespace> namespaces, List<IReferencable> references, DocumentedType association) { NamespaceIdentifier namespaceName = Identifier.FromNamespace(association.Type.Namespace); Namespace @namespace = namespaces.Find(x => x.IsIdentifiedBy(namespaceName)); DeclaredType doc = DeclaredType.Unresolved((TypeIdentifier)association.Name, association.Type, @namespace); if (association.Xml != null) { XmlNode summaryNode = association.Xml.SelectSingleNode("summary"); if (summaryNode != null) doc.Summary = commentContentParser.Parse(summaryNode); GetReferencesFromComment(references, doc.Summary); } if (matchedAssociations.ContainsKey(association.Name)) return; // weird case when a type has the same method declared twice references.Add(doc); matchedAssociations.Add(association.Name, doc); @namespace.AddType(doc); }
private void AddNamespace(List<Namespace> namespaces, DocumentedType association) { var ns = Identifier.FromNamespace(association.Type.Namespace); if (!namespaces.Exists(x => x.IsIdentifiedBy(ns))) { var doc = new Namespace(ns); matchedAssociations.Add(association.Name.CloneAsNamespace(), doc); namespaces.Add(doc); } }