Class GeneratorBase
Inheritance
GeneratorBase
Assembly: BenchmarkDotNet.dll
public abstract class GeneratorBase : IGenerator
Methods
if you need to copy some extra files to make the benchmarks work you should override this method
Declaration
protected virtual void CopyAllRequiredFiles(ArtifactsPaths artifactsPaths)
Parameters
generates an app.config file next to the executable with benchmarks
Declaration
protected virtual void GenerateAppConfig(BuildPartition buildPartition, ArtifactsPaths artifactsPaths)
Parameters
generates a script can be used when debugging compilation issues
Declaration
protected abstract void GenerateBuildScript(BuildPartition buildPartition, ArtifactsPaths artifactsPaths)
Parameters
generates the C# source code with all required boilerplate.
You most probably do NOT need to override this method!!
Declaration
protected virtual void GenerateCode(BuildPartition buildPartition, ArtifactsPaths artifactsPaths)
Parameters
generates NuGet.Config file to make sure that BDN is using the right NuGet feeds
Declaration
protected virtual void GenerateNuGetConfig(ArtifactsPaths artifactsPaths)
Parameters
Declaration
public GenerateResult GenerateProject(BuildPartition buildPartition, ILogger logger, string rootArtifactsFolderPath)
Parameters
Returns
generates .csproj file with a reference to the project with benchmarks
Declaration
protected virtual void GenerateProject(BuildPartition buildPartition, ArtifactsPaths artifactsPaths, ILogger logger)
Parameters
returns a list of artifacts that should be removed after running the benchmarks
Declaration
protected abstract string[] GetArtifactsToCleanup(ArtifactsPaths artifactsPaths)
Parameters
Returns
returns a path where executable should be found after the build
Declaration
protected virtual string GetBinariesDirectoryPath(string buildArtifactsDirectoryPath, string configuration)
Parameters
Type |
Name |
Description |
String |
buildArtifactsDirectoryPath |
|
String |
configuration |
|
Returns
returns a path to the folder where auto-generated project and code are going to be placed
Declaration
protected abstract string GetBuildArtifactsDirectoryPath(BuildPartition assemblyLocation, string programName)
Parameters
Returns
returns OS-specific executable extension
Declaration
protected virtual string GetExecutableExtension()
Returns
Declaration
protected virtual string GetExecutablePath(string binariesDirectoryPath, string programName)
Parameters
Type |
Name |
Description |
String |
binariesDirectoryPath |
|
String |
programName |
|
Returns
returns a path to the folder where NuGet packages should be restored
Declaration
protected virtual string GetPackagesDirectoryPath(string buildArtifactsDirectoryPath)
Parameters
Type |
Name |
Description |
String |
buildArtifactsDirectoryPath |
|
Returns
returns a path to the auto-generated .csproj file
Declaration
protected virtual string GetProjectFilePath(string buildArtifactsDirectoryPath)
Parameters
Type |
Name |
Description |
String |
buildArtifactsDirectoryPath |
|
Returns
Implements