MustacheSharp/mustache-sharp/VariableArgument.cs

25 lines
449 B
C#
Raw Normal View History

2014-05-21 21:02:31 +00:00
using System;
namespace Mustache
{
public class VariableArgument : IArgument
{
private readonly string name;
public VariableArgument(string name)
{
this.name = name;
}
public string GetKey()
{
return null;
}
public object GetValue(Scope keyScope, Scope contextScope)
{
2016-03-21 17:41:46 +00:00
return contextScope.Find(name, false);
2014-05-21 21:02:31 +00:00
}
}
}