Summary
Writes the start of a TeamCity build block, then returns a disposable that writes the build block end on dispose.
Syntax
public static IDisposable BuildBlock(this ITeamCityProvider teamCityProvider, string compilerName)
Examples
if (BuildSystem.TeamCity.IsRunningOnTeamCity)
{
using (BuildSystem.TeamCity.BuildBlock("dotnet"))
{
DotNetBuild("./src");
}
}
if (TeamCity.IsRunningOnTeamCity)
{
using (TeamCity.BuildBlock("dotnet"))
{
DotNetBuild("./src");
}
}
Parameters
| Name |
Type |
Description |
| teamCityProvider |
ITeamCityProvider |
TeamCity provider. |
| compilerName |
string |
The name of the build block. |
Return Value
| Type |
Description |
| IDisposable |
A disposable that writes the build block end. |