public virtual object GetProperty(Interpreter interpreter, TemplateFrame frame, object o, object property, string propertyName)
{
if (o == null)
throw new ArgumentNullException("o");
Type c = o.GetType();
if (property == null)
throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName ?? "null"));
object value;
var accessor = FindMember(c, propertyName);
if (accessor != null)
{
value = accessor(o);
}
else
{
throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName));
}
return value;
}