Show / Hide Table of Contents

Class DotNetCliGenerator

Inheritance
Object
GeneratorBase
DotNetCliGenerator
CsProjGenerator
Implements
IGenerator
Inherited Members
GeneratorBase.GenerateProject(BuildPartition, ILogger, String)
GeneratorBase.GetBinariesDirectoryPath(String, String)
GeneratorBase.GetProjectFilePath(String)
GeneratorBase.GenerateNuGetConfig(ArtifactsPaths)
GeneratorBase.GenerateProject(BuildPartition, ArtifactsPaths, ILogger)
GeneratorBase.GenerateAppConfig(BuildPartition, ArtifactsPaths)
GeneratorBase.GenerateCode(BuildPartition, ArtifactsPaths)
GeneratorBase.GetExecutablePath(String, String)
Namespace: BenchmarkDotNet.Toolchains.DotNetCli
Assembly: BenchmarkDotNet.dll
Syntax
public abstract class DotNetCliGenerator : GeneratorBase, IGenerator

Constructors

DotNetCliGenerator(String, String, String, Boolean)

Declaration
protected DotNetCliGenerator(string targetFrameworkMoniker, string cliPath, string packagesPath, bool isNetCore)
Parameters
Type Name Description
String targetFrameworkMoniker
String cliPath
String packagesPath
Boolean isNetCore

Properties

CliPath

Declaration
public string CliPath { get; }
Property Value
Type Description
String

IsNetCore

Declaration
protected bool IsNetCore { get; }
Property Value
Type Description
Boolean

PackagesPath

Declaration
public string PackagesPath { get; }
Property Value
Type Description
String

TargetFrameworkMoniker

Declaration
public string TargetFrameworkMoniker { get; }
Property Value
Type Description
String

Methods

CopyAllRequiredFiles(ArtifactsPaths)

Declaration
protected override void CopyAllRequiredFiles(ArtifactsPaths artifactsPaths)
Parameters
Type Name Description
ArtifactsPaths artifactsPaths
Overrides
GeneratorBase.CopyAllRequiredFiles(ArtifactsPaths)

GenerateBuildScript(BuildPartition, ArtifactsPaths)

Declaration
protected override void GenerateBuildScript(BuildPartition buildPartition, ArtifactsPaths artifactsPaths)
Parameters
Type Name Description
BuildPartition buildPartition
ArtifactsPaths artifactsPaths
Overrides
GeneratorBase.GenerateBuildScript(BuildPartition, ArtifactsPaths)

GetArtifactsToCleanup(ArtifactsPaths)

Declaration
protected override string[] GetArtifactsToCleanup(ArtifactsPaths artifactsPaths)
Parameters
Type Name Description
ArtifactsPaths artifactsPaths
Returns
Type Description
String[]
Overrides
GeneratorBase.GetArtifactsToCleanup(ArtifactsPaths)

GetBuildArtifactsDirectoryPath(BuildPartition, String)

we need our folder to be on the same level as the project that we want to reference we are limited by xprojs (by default compiles all .cs files in all subfolders, Program.cs could be doubled and fail the build) and also by NuGet internal implementation like looking for global.json file in parent folders

Declaration
protected override string GetBuildArtifactsDirectoryPath(BuildPartition buildPartition, string programName)
Parameters
Type Name Description
BuildPartition buildPartition
String programName
Returns
Type Description
String
Overrides
GeneratorBase.GetBuildArtifactsDirectoryPath(BuildPartition, String)

GetExecutableExtension()

Declaration
protected override string GetExecutableExtension()
Returns
Type Description
String
Overrides
GeneratorBase.GetExecutableExtension()

GetPackagesDirectoryPath(String)

Declaration
protected override string GetPackagesDirectoryPath(string buildArtifactsDirectoryPath)
Parameters
Type Name Description
String buildArtifactsDirectoryPath
Returns
Type Description
String
Overrides
GeneratorBase.GetPackagesDirectoryPath(String)

Implements

IGenerator
In This Article
Back to top Copyright © 2013–2021 .NET Foundation and contributors