Created
September 19, 2012 21:43
-
-
Save hunt3ri/3752484 to your computer and use it in GitHub Desktop.
Get summary block from each API method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Read the Summary block from each API method, grab the entire XML fragment as we'll use a series of | |
/// Extension methods on APIExplorer to parse the XML for output later. | |
/// </summary> | |
public virtual string GetDocumentation(HttpActionDescriptor actionDescriptor) | |
{ | |
var memberNode = GetMemberNode(actionDescriptor); | |
if (memberNode != null) | |
{ | |
var summaryNode = memberNode.SelectSingleNode("summary"); | |
if (summaryNode != null) | |
{ | |
return summaryNode.OuterXml; | |
} | |
} | |
return "No Documentation Found."; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment