Beispiel #1
0
 /// <summary>
 /// Writes the start of a TeamCity build block, then returns a disposable that write the end on Dispose.
 /// </summary>
 /// <param name="teamCityProvider">TeamCity provider.</param>
 /// <param name="compilerName">The name of the build block.</param>
 /// <returns>A disposable wrapper the writes the build block end.</returns>
 public static IDisposable BuildBlock(this ITeamCityProvider teamCityProvider, string compilerName)
 {
     if (teamCityProvider == null)
     {
         throw new ArgumentNullException("teamCityProvider");
     }
     teamCityProvider.WriteStartBuildBlock(compilerName);
     return(new TeamCityActionDisposable(teamCityProvider, tc => tc.WriteEndBuildBlock(compilerName)));
 }
 /// <summary>
 /// Writes the start of a TeamCity build block, then returns a disposable that writes the build block end on dispose.
 /// </summary>
 /// <param name="teamCityProvider">TeamCity provider.</param>
 /// <param name="compilerName">The name of the build block.</param>
 /// <returns>A disposable that writes the build block end.</returns>
 public static IDisposable BuildBlock(this ITeamCityProvider teamCityProvider, string compilerName)
 {
     if (teamCityProvider == null)
     {
         throw new ArgumentNullException(nameof(teamCityProvider));
     }
     teamCityProvider.WriteStartBuildBlock(compilerName);
     return(Disposable.Create(() => teamCityProvider.WriteEndBuildBlock(compilerName)));
 }