C# Class NCoverExplorer.MSBuildTasks.NCoverExplorer

MSBuild task for automating NCoverExplorer.Console. Using this task you can merge coverage files from NCover, produce xml coverage reports for use with CruiseControl.Net, produce html report files directly, fail automated builds if coverage thresholds are not met and apply a range of detail to the reports produced such as sorting, filtering and coverage exclusions.
Inheritance: Microsoft.Build.Utilities.ToolTask
显示文件 Open project: marektihkan/Arc

Private Properties

Property Type Description
_BuildTempConfigXmlFile void
_CheckToolPath void
_CleanupConfigFile void
_GetConfigFilename string
_WriteCoverExclusionsFromPairsToTempConfigFile void
_WriteCoverExclusionsFromXmlToTempConfigFile void
_WriteModuleThresholdsToTempConfigFile void

Public Methods

Method Description
Execute ( ) : bool

Executes the task.

NCoverExplorer ( ) : System

Initializes a new instance of the NCoverExplorer class.

Protected Methods

Method Description
GenerateCommandLineCommands ( ) : string

Returns a string value containing the command line arguments to pass directly to the executable file.

GenerateFullPathToTool ( ) : string

Returns the fully qualified path to the executable file.

LogToolCommand ( string message ) : void

Logs the starting point of the run to all registered loggers.

ValidateParameters ( ) : bool

Validate the parameters supplied to this task.

Private Methods

Method Description
_BuildTempConfigXmlFile ( ) : void

Builds a temporary NCoverExplorer configuration file which we can pass in the command line. We require this as the command line itself does not directly support all the argument combinations.

_CheckToolPath ( ) : void

Determine the path to NCoverExplorer. Either the user can specify it in the arguments to the task, or we look in the registry, program files and finally just assume it is in the path.

_CleanupConfigFile ( ) : void

Removes generated settings file after process has run.

_GetConfigFilename ( ) : string

Return a temporary filename for the config file for executing NCoverExplorer.Console.

_WriteCoverExclusionsFromPairsToTempConfigFile ( XmlTextWriter xmlTextWriter ) : void

The coverage exclusions have been inlined as type=pattern semi-colon delimited pairs. Break apart and write to the temp config file.

_WriteCoverExclusionsFromXmlToTempConfigFile ( XmlTextWriter xmlTextWriter ) : void

The coverage exclusions have been inlined as type=pattern semi-colon delimited pairs. Break apart and write to the temp config file.

_WriteModuleThresholdsToTempConfigFile ( XmlTextWriter xmlTextWriter ) : void

Iterate through the module thresholds and write their values into the configuration file.

Method Details

Execute() public method

Executes the task.
public Execute ( ) : bool
return bool

GenerateCommandLineCommands() protected method

Returns a string value containing the command line arguments to pass directly to the executable file.
protected GenerateCommandLineCommands ( ) : string
return string

GenerateFullPathToTool() protected method

Returns the fully qualified path to the executable file.
protected GenerateFullPathToTool ( ) : string
return string

LogToolCommand() protected method

Logs the starting point of the run to all registered loggers.
protected LogToolCommand ( string message ) : void
message string A descriptive message to provide loggers, usually the command line and switches.
return void

NCoverExplorer() public method

Initializes a new instance of the NCoverExplorer class.
public NCoverExplorer ( ) : System
return System

ValidateParameters() protected method

Validate the parameters supplied to this task.
protected ValidateParameters ( ) : bool
return bool