XmlDocAliases.

ParseXmlDocExampleCode(ICakeContext, FilePath) Method

Summary

Parses Xml documentation example code from given path.

Syntax

[CakeMethodAlias]
public static IEnumerable<XmlDocExampleCode> ParseXmlDocExampleCode(this ICakeContext context, FilePath xmlFilePath)

Examples

var exampleCodes = ParseXmlDocExampleCode("./Cake.Common.xml");
foreach(var exampleCode in exampleCodes)
{
    Information(
        "{0}\r\n{1}",
        exampleCode.Name,
        exampleCode.Code
    );
}

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.

Parameters

Name Type Description
context ICakeContext The context.
xmlFilePath FilePath The Path to the file to parse.

Return Value

Type Description
IEnumerable<XmlDocExampleCode> Parsed example code.