4 using System.Collections.Generic;
5 using System.ComponentModel;
7 using System.Threading.Tasks;
9 namespace SiliconStudio.BuildEngine
11 [Description(
"Output enumeration")]
12 [Obsolete(
"This class is not maintained.")]
15 public BuildStep Template {
get {
return template; } set {
template = value;
if (
template != null) template.Parent =
this; } }
18 public List<string> SearchTags {
get; set; }
24 SearchTags =
new List<string>();
25 Urls = Enumerable.Empty<
string>();
32 return "Output enumeration" + (Urls.FirstOrDefault() != null ?
" (" + Urls.Count() +
" urls)" :
"");
40 clone.Template = template.Clone();
41 clone.SearchTags = SearchTags.ToList();
47 Steps =
new List<BuildStep>();
49 var urls = Enumerable.Empty<
string>();
54 parentList = parentList.Parent;
57 var parentListBuildStep = (ListBuildStep)parentList;
60 foreach (
string tag
in SearchTags)
62 urls = urls.Concat(parentListBuildStep.OutputObjects.Where(x => x.Value.Tags.Contains(tag)).Select(x => x.Key.ToString()));
65 var buildStepToWait =
new List<BuildStep>();
70 foreach (
string url
in Urls)
72 executeContext.Variables[
"URL"] = url;
73 var fileBuildStep = Template.Clone();
74 ((List<BuildStep>)Steps).Add(fileBuildStep);
75 buildStepToWait.Add(fileBuildStep);
76 executeContext.ScheduleBuildStep(fileBuildStep);
80 await CompleteCommands(executeContext, buildStepToWait);
82 return ResultStatus.Successful;
A BuildStep that can spawn multiple BuildStep. Input and output tracking and merging will be performe...
override string ToString()
override async Task< ResultStatus > Execute(IExecuteContext executeContext, BuilderContext builderContext)
Execute the BuildStep, usually resulting in scheduling tasks in the scheduler
OutputEnumerationBuildStep()
override BuildStep Clone()
Clone this Build Step.