mirror of
https://github.com/actions/runner.git
synced 2025-12-17 07:54:19 +00:00
GitHub Actions Runner
This commit is contained in:
16
src/Sdk/DTExpressions/Expressions/ContainsNode.cs
Normal file
16
src/Sdk/DTExpressions/Expressions/ContainsNode.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace GitHub.DistributedTask.Expressions
|
||||
{
|
||||
internal sealed class ContainsNode : FunctionNode
|
||||
{
|
||||
protected sealed override Boolean TraceFullyRealized => false;
|
||||
|
||||
protected sealed override Object EvaluateCore(EvaluationContext context)
|
||||
{
|
||||
String left = Parameters[0].EvaluateString(context) as String ?? String.Empty;
|
||||
String right = Parameters[1].EvaluateString(context) as String ?? String.Empty;
|
||||
return left.IndexOf(right, StringComparison.OrdinalIgnoreCase) >= 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user