public void Add( List<Namespace> namespaces, DocumentedField association ) { try { 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 ); } catch( Exception ) { } }
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; } Namespace ns = this.FindNamespace(association, namespaces); DeclaredType type = this.FindType(ns, association); DeclaredType returnType = DeclaredType.Unresolved( Identifier.FromType(association.Field.FieldType), association.Field.FieldType, Namespace.Unresolved(Identifier.FromNamespace(association.Field.FieldType.Namespace))); Field doc = Field.Unresolved( Identifier.FromField(association.Field, association.TargetType), type, returnType); this.ParseSummary(association, doc); this.ParseRemarks(association, doc); this.ParseExample(association, doc); this.matchedAssociations.Add(association.Name, doc); type.AddField(doc); }