Esempio n. 1
0
        internal override IDisposable WriteBlock(string text)
        {
            var stopWatch = new Stopwatch();

            return(DelegateDisposable.CreateBracket(
                       () =>
            {
                _teamCity.OpenBlock(text);
                stopWatch.Start();
            },
                       () =>
            {
                _teamCity.CloseBlock(text);
                _teamCity.AddStatisticValue(
                    $"NUKE_DURATION_{text.SplitCamelHumpsWithSeparator("_").ToUpper()}",
                    stopWatch.ElapsedMilliseconds.ToString());
                stopWatch.Stop();
            }));
        }