C# Class Xunit.Reporting.Internal.Generator.FileWriter

A simple file writer.
Inheritance: IFileWriter
显示文件 Open project: BjRo/xunitbddextensions

Public Methods

Method Description
FileWriter ( IArguments arguments, IFileSystemHelper fileSystemHelper ) : System

Creates a new instance of the FileWriter class.

Write ( string fileName, Action contentWriter ) : void

Writes the content supplied via contentWriter to the file specified via fileName.

Private Methods

Method Description
GetDefaultPath ( ) : string
GetTargetFileName ( string fileName ) : string
GetTargetPath ( ) : string

Method Details

FileWriter() public method

Creates a new instance of the FileWriter class.
public FileWriter ( IArguments arguments, IFileSystemHelper fileSystemHelper ) : System
arguments IArguments /// Specifies the arguments for this writer. ///
fileSystemHelper IFileSystemHelper /// Specifies the helper for ///
return System

Write() public method

Writes the content supplied via contentWriter to the file specified via fileName.
public Write ( string fileName, Action contentWriter ) : void
fileName string Specifies the filename to write to.
contentWriter Action Specifies the writer handler which is called /// to fill the file with content.
return void