GitHub Actions Runner

This commit is contained in:
Tingluo Huang
2019-10-10 00:52:42 -04:00
commit c8afc84840
1255 changed files with 198670 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace GitHub.DistributedTask.WebApi
{
[DataContract]
[KnownType(typeof(ExpressionValidationItem))]
[KnownType(typeof(InputValidationItem))]
[JsonConverter(typeof(ValidationItemJsonConverter))]
public class ValidationItem
{
protected ValidationItem(String type)
{
this.Type = type;
}
/// <summary>
/// Type of validation item
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String Type
{
get;
private set;
}
/// <summary>
/// Value to validate.
/// The conditional expression to validate for the input for "expression" type
/// Eg:eq(variables['Build.SourceBranch'], 'refs/heads/master');eq(value, 'refs/heads/master')
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String Value
{
get;
set;
}
/// <summary>
/// Tells whether the current input is valid or not
/// </summary>
[DataMember(EmitDefaultValue = false)]
public Boolean? IsValid
{
get;
set;
}
/// <summary>
/// Reason for input validation failure
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String Reason
{
get;
set;
}
}
}