MustacheSharp/mustache-sharp/PlaceholderArgument.cs

25 lines
451 B
C#

using System;
namespace Mustache
{
public class PlaceholderArgument : IArgument
{
private readonly string name;
public PlaceholderArgument(string name)
{
this.name = name;
}
public string GetKey()
{
return name;
}
public object GetValue(Scope keyScope, Scope contextScope)
{
return keyScope.Find(name, false);
}
}
}