mirror of
https://github.com/actions/runner.git
synced 2025-12-16 15:06:49 +00:00
@@ -16,7 +16,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema
|
||||
|
||||
protected Definition(MappingToken definition)
|
||||
{
|
||||
for (var i = 0; i < definition.Count; )
|
||||
for (var i = 0; i < definition.Count;)
|
||||
{
|
||||
var definitionKey = definition[i].Key.AssertString($"{TemplateConstants.Definition} key");
|
||||
if (String.Equals(definitionKey.Value, TemplateConstants.Context, StringComparison.Ordinal))
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema
|
||||
// string-definition-properties
|
||||
mappingDefinition = new MappingDefinition();
|
||||
mappingDefinition.Properties.Add(TemplateConstants.Constant, new PropertyValue(new StringToken(null, null, null, TemplateConstants.NonEmptyString)));
|
||||
mappingDefinition.Properties.Add(TemplateConstants.IgnoreCase, new PropertyValue(new StringToken(null, null, null,TemplateConstants.Boolean)));
|
||||
mappingDefinition.Properties.Add(TemplateConstants.IgnoreCase, new PropertyValue(new StringToken(null, null, null, TemplateConstants.Boolean)));
|
||||
mappingDefinition.Properties.Add(TemplateConstants.RequireNonEmpty, new PropertyValue(new StringToken(null, null, null, TemplateConstants.Boolean)));
|
||||
schema.Definitions.Add(TemplateConstants.StringDefinitionProperties, mappingDefinition);
|
||||
|
||||
@@ -490,4 +490,4 @@ namespace GitHub.DistributedTask.ObjectTemplating.Schema
|
||||
private static readonly Regex s_definitionNameRegex = new Regex("^[a-zA-Z_][a-zA-Z0-9_-]*$", RegexOptions.Compiled);
|
||||
private static TemplateSchema s_schema;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace GitHub.DistributedTask.ObjectTemplating
|
||||
List<String> nonDuplicates = new List<String>();
|
||||
foreach (String key in hitCount.Keys)
|
||||
{
|
||||
if(hitCount[key] == 1)
|
||||
if (hitCount[key] == 1)
|
||||
{
|
||||
nonDuplicates.Add(key);
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens
|
||||
|
||||
public override TemplateToken Clone(Boolean omitSource)
|
||||
{
|
||||
return omitSource ? new BooleanToken(null, null, null, m_value) : new BooleanToken(FileId, Line, Column, m_value);
|
||||
return omitSource ? new BooleanToken(null, null, null, m_value) : new BooleanToken(FileId, Line, Column, m_value);
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
return m_value ? "true" : "false";
|
||||
return m_value ? "true" : "false";
|
||||
}
|
||||
|
||||
Boolean IBoolean.GetBoolean()
|
||||
|
||||
@@ -21,12 +21,12 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens
|
||||
|
||||
public override TemplateToken Clone(Boolean omitSource)
|
||||
{
|
||||
return omitSource ? new NullToken(null, null, null) : new NullToken(FileId, Line, Column);
|
||||
return omitSource ? new NullToken(null, null, null) : new NullToken(FileId, Line, Column);
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
return String.Empty;
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens
|
||||
|
||||
public override TemplateToken Clone(Boolean omitSource)
|
||||
{
|
||||
return omitSource ? new NumberToken(null, null, null, m_value) : new NumberToken(FileId, Line, Column, m_value);
|
||||
return omitSource ? new NumberToken(null, null, null, m_value) : new NumberToken(FileId, Line, Column, m_value);
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
|
||||
@@ -23,25 +23,25 @@ namespace GitHub.DistributedTask.ObjectTemplating.Tokens
|
||||
|
||||
public String Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_value == null)
|
||||
{
|
||||
m_value = String.Empty;
|
||||
}
|
||||
get
|
||||
{
|
||||
if (m_value == null)
|
||||
{
|
||||
m_value = String.Empty;
|
||||
}
|
||||
|
||||
return m_value;
|
||||
}
|
||||
return m_value;
|
||||
}
|
||||
}
|
||||
|
||||
public override TemplateToken Clone(Boolean omitSource)
|
||||
{
|
||||
return omitSource ? new StringToken(null, null, null, m_value) : new StringToken(FileId, Line, Column, m_value);
|
||||
return omitSource ? new StringToken(null, null, null, m_value) : new StringToken(FileId, Line, Column, m_value);
|
||||
}
|
||||
|
||||
public override String ToString()
|
||||
{
|
||||
return m_value ?? String.Empty;
|
||||
return m_value ?? String.Empty;
|
||||
}
|
||||
|
||||
String IString.GetString()
|
||||
|
||||
Reference in New Issue
Block a user