OpenCoverAliases.

OpenCover(ICakeContext, Action<ICakeContext>, FilePath, OpenCoverSettings) Method

Summary

Runs OpenCover for the specified action and settings.
Namespace
Cake.Common.Tools.OpenCover
Containing Type
OpenCoverAliases

Syntax

[CakeMethodAlias]
public static void OpenCover(this ICakeContext context, Action<ICakeContext> action, FilePath outputFile, OpenCoverSettings settings)

Examples

OpenCover(tool => {
  tool.XUnit2("./**/App.Tests.dll",
    new XUnit2Settings {
      ShadowCopy = false
    });
  },
  new FilePath("./result.xml"),
  new OpenCoverSettings()
    .WithFilter("+[App]*")
    .WithFilter("-[App.Tests]*"));

Attributes

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

Parameters

Name Type Description
context ICakeContext The context.
action Action<ICakeContext> The action to run OpenCover for.
outputFile FilePath The OpenCover output file.
settings OpenCoverSettings The settings.

Return Value

Type Description
void