dotnet-installer/scripts/Microsoft.DotNet.Cli.Build.Framework/TargetAttribute.cs
Bryan Thornbury 6d8b622451 Add Conditional Target capabilities to the build scripts
Make Attribute properties immutable

PR Feedback, bugfixes

PR Feedback
2016-02-24 16:55:11 -08:00

24 lines
No EOL
680 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.DotNet.Cli.Build.Framework
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class TargetAttribute : Attribute
{
public string Name { get; set; }
public IEnumerable<string> Dependencies { get; }
public TargetAttribute()
{
Dependencies = Enumerable.Empty<string>();
}
// Attributes can only use constants, so a comma-separated string is better :)
public TargetAttribute(params string[] dependencies)
{
Dependencies = dependencies;
}
}
}