XmlDocAliases.

ParseXmlDocFilesExampleCode(ICakeContext, string) Method

Summary

Parses Xml documentation example code from file(s) using given pattern.

Syntax

[CakeMethodAlias]
public static IEnumerable<XmlDocExampleCode> ParseXmlDocFilesExampleCode(this ICakeContext context, string pattern)

Examples

var filesExampleCodes = ParseXmlDocFilesExampleCode("./Cake.*.xml");
foreach(var exampleCode in filesExampleCodes)
{
    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.
pattern string The globber file pattern.

Return Value

Type Description
IEnumerable<XmlDocExampleCode> Parsed example code.