Ejemplo n.º 1
0
        public async Task Render(IOctopusAsyncRepository repository, ICommandOutputProvider commandOutputProvider, TaskResource resource)
        {
            var details = await repository.Tasks.GetDetails(resource).ConfigureAwait(false);

            if (details.ActivityLogs != null)
            {
                foreach (var item in details.ActivityLogs.SelectMany(a => a.Children))
                {
                    if (commandOutputProvider.ServiceMessagesEnabled())
                    {
                        if (commandOutputProvider.IsVSTS())
                        {
                            RenderToVSTS(item, commandOutputProvider, string.Empty);
                        }
                        else
                        {
                            RenderToTeamCity(item, commandOutputProvider);
                        }
                    }
                    else
                    {
                        RenderToConsole(item, commandOutputProvider, string.Empty);
                    }
                }
            }
        }