/// <summary> /// The asynchronous execution method for this MSBuild task which verifies the integrity of required properties /// and validates their formatting, specifically determining whether the provided xUnit project data have a /// one-to-one mapping. It then creates this mapping before asynchronously preparing the HelixWorkItem TaskItem /// objects via the PrepareWorkItem method. /// </summary> /// <returns></returns> private async Task ExecuteAsync() { XUnitWorkItems = (await Task.WhenAll(XUnitProjects.Select(PrepareWorkItem))) .SelectMany(i => i) .Where(wi => wi != null) .ToArray(); return; }
/// <summary> /// The asynchronous execution method for this MSBuild task which verifies the integrity of required properties /// and validates their formatting, specifically determining whether the provided xUnit project data have a /// one-to-one mapping. It then creates this mapping before asynchronously preparing the HelixWorkItem TaskItem /// objects via the PrepareWorkItem method. /// </summary> /// <returns></returns> private async Task ExecuteAsync() { var testExclusion = File.ReadAllLines(TestProjectExclusionListPath) .Select(l => l.Trim()) .Where(l => !string.IsNullOrWhiteSpace(l)); var xUnitProjectsCanRunInHelix = XUnitProjects.Where(p => !testExclusion.Any(p.ItemSpec.Contains)); XUnitWorkItems = (await Task.WhenAll(xUnitProjectsCanRunInHelix.Select(PrepareWorkItem))) .SelectMany(i => i) .Where(wi => wi != null) .ToArray(); return; }