Logo Search packages:      
Sourcecode: ndoc version File versions  Download package

void NDoc::Documenter::LinearHtml::LinearHtmlDocumenter::MakeHtmlForTypeMember ( string  parentTypeName,
string  memberType,
XPathNavigator  nav,
XmlTextWriter  xtw 
) [inline, private]

Make (and write) html for a Type (class, interface, ...) member, such as a property, field, etc.

Parameters:
parentTypeName The Type's name.
memberType The type of the member (property, field, method, etc)
nav Pointing to the member's node.
xtw 

Definition at line 1440 of file LinearHtmlDocumenter.cs.

            {
                  bool includeMethodSignature = MyConfig.MethodParametersInTable;
                  string memberAccess = nav.GetAttribute("access", "");
                  string memberName = nav.GetAttribute("name", "");
                  string typeName = nav.GetAttribute("type", "");
                  string typeBaseName = TypeBaseName(typeName);
                  string declaringType = nav.GetAttribute("declaringType", "");

                  XPathNavigator summaryNav = GetDescendantNodeWithName(nav, "summary");
                  //DumpNavTree(summaryNav, "    ");
                  XPathNavigator remarksNav = GetDescendantNodeWithName(nav, "remarks");

                  string summaryString = string.Empty;
                  if (summaryNav != null) summaryString = summaryNav.Value;
                  string remarksString = string.Empty;
                  if (MyConfig.IncludeTypeMemberDetails && (remarksNav != null))
                        remarksString = "<br/><br/>" + remarksNav.Value;

                  //
                  // create a string for the name column
                  //
                  string nameString = memberName;
                  string args = "";
                  switch(memberType)
                  {
                        case "field":
                              nameString = KeyWrap(memberName) + TypeRefWrap(" : " + typeBaseName);
                              break;
                        case "property":
                              nameString = KeyWrap(memberName) + TypeRefWrap(" : " + typeBaseName);
                              break;
                        case "method":
                              typeBaseName = TypeBaseName(nav.GetAttribute("returnType", ""));
                              if (includeMethodSignature) args = MakeMethodParametersString(nav);
                              nameString = KeyWrap(memberName + "(" + args + ")") + TypeRefWrap(" : " + typeBaseName);
                              remarksString = string.Empty; // don't include remarks for methods
                              break;
                        case "constructor":
                              if (includeMethodSignature) args = MakeMethodParametersString(nav);
                              nameString = KeyWrap(parentTypeName + "(" + args + ")");
                              remarksString = string.Empty; // don't include remarks for methods
                              break;
                  }

                  //
                  // write the member if it isn't from a System class
                  //
                  if (declaringType.IndexOf("System") != 0)
                  {
                        xtw.WriteStartElement("TR");
                        xtw.WriteStartElement("TD");
                        xtw.WriteRaw(nameString);
                        xtw.WriteEndElement();
                        xtw.WriteElementString("TD", ToAccessDeclaration(memberAccess));

                        if (declaringType.Length > 0)
                        {
                              //xtw.WriteElementString("TD", "<em>(from " + declaringType + ")</em> " + summaryNav.Value);

                              // declared by an ancestor
                              xtw.WriteStartElement("TD");
                              xtw.WriteStartElement("em");
                              xtw.WriteRaw("(from " + TypeRefWrap(declaringType) + ")");
                              xtw.WriteEndElement(); // em
                              xtw.WriteString(" ");
                              xtw.WriteString(summaryString);
                              if (!remarksString.Equals(string.Empty)) xtw.WriteRaw(remarksString);
                              xtw.WriteEndElement(); // TD
                        }
                        else
                        {
                              xtw.WriteStartElement("TD");
                              xtw.WriteString(summaryString);
                              if (!remarksString.Equals(string.Empty)) xtw.WriteRaw(remarksString);
                              xtw.WriteEndElement(); // TD
                        }

                        xtw.WriteEndElement();
                  }
            }


Generated by  Doxygen 1.6.0   Back to index