internal static object GetValue(PropertyInfo prop, object obj, object[] index)
{
JSProperty property = prop as JSProperty;
if (property != null)
{
return(property.GetValue(obj, BindingFlags.ExactBinding, null, index, null));
}
JSWrappedProperty property2 = prop as JSWrappedProperty;
if (property2 != null)
{
return(property2.GetValue(obj, BindingFlags.ExactBinding, null, index, null));
}
MethodInfo getMethod = GetGetMethod(prop, false);
if (getMethod != null)
{
try
{
return(getMethod.Invoke(obj, BindingFlags.ExactBinding, null, index, null));
}
catch (TargetInvocationException exception)
{
throw exception.InnerException;
}
}
throw new MissingMethodException();
}