2016-02-02 18:04:50 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Build.Framework
|
|
|
|
{
|
2016-02-20 01:00:41 +00:00
|
|
|
public class BuildTarget
|
|
|
|
{
|
|
|
|
public string Name { get; }
|
2016-02-02 18:04:50 +00:00
|
|
|
public string Source { get; }
|
2016-02-20 01:00:41 +00:00
|
|
|
public IEnumerable<string> Dependencies { get; }
|
|
|
|
public IEnumerable<Func<bool>> Conditions { get; }
|
|
|
|
public Func<BuildTargetContext, BuildTargetResult> Body { get; }
|
2016-02-02 18:04:50 +00:00
|
|
|
|
2016-02-20 01:00:41 +00:00
|
|
|
public BuildTarget(string name, string source) : this(name, source, Enumerable.Empty<string>(), Enumerable.Empty<Func<bool>>(), null) { }
|
|
|
|
public BuildTarget(string name, string source, IEnumerable<string> dependencies) : this(name, source, dependencies, Enumerable.Empty<Func<bool>>(), null) { }
|
|
|
|
public BuildTarget(
|
|
|
|
string name,
|
|
|
|
string source,
|
|
|
|
IEnumerable<string> dependencies,
|
|
|
|
IEnumerable<Func<bool>> conditions,
|
|
|
|
Func<BuildTargetContext, BuildTargetResult> body)
|
|
|
|
{
|
|
|
|
Name = name;
|
2016-02-02 18:04:50 +00:00
|
|
|
Source = source;
|
2016-02-20 01:00:41 +00:00
|
|
|
Dependencies = dependencies;
|
|
|
|
Conditions = conditions;
|
|
|
|
Body = body;
|
|
|
|
}
|
|
|
|
}
|
2016-02-02 18:04:50 +00:00
|
|
|
}
|