25 lines
449 B
C#
25 lines
449 B
C#
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)
|
|
{
|
|
return contextScope.Find(name, false);
|
|
}
|
|
}
|
|
}
|