Exemplo n.º 1
0
        public override IAsyncEnumerable <Path> ComputePaths(EvaluationContext ctx)
        {
            bool found = ctx.TryGetVariable(VariableName, out TemplateVariable variableEntry);

            return(found ?
                   variableEntry.ResolvePaths() :
                   AsyncUtil.Empty <Path>());
        }
Exemplo n.º 2
0
 public override async Task <object> Evaluate(EvaluationContext ctx)
 {
     if (ctx.TryGetVariable(VariableName, out TemplateVariable variableEntry))
     {
         return(await variableEntry.Evaluate());
     }
     else
     {
         throw new TemplateException($"Unknown variable: {VariableName}");
     }
 }