private prepRet ( |
||
t | ||
x | Object | |
return | Object |
// used in generated code public static object GetInstanceFieldOrProperty(object target, string fieldName) { Type t = target.GetType(); FieldInfo field = GetField(t, fieldName, false); if (field != null) { return(Reflector.prepRet(field.FieldType, field.GetValue(target))); } PropertyInfo prop = GetProperty(t, fieldName, false); if (prop != null) { return(Reflector.prepRet(prop.PropertyType, prop.GetValue(target, new object[0]))); } MethodInfo method = GetArityZeroMethod(t, fieldName, false); if (method != null) { return(Reflector.prepRet(method.ReturnType, method.Invoke(target, new object[0]))); } throw new ArgumentException(String.Format("No matching instance field/property found: {0} for {1}", fieldName, t)); }
public object reduce(IFn f, object start) { object ret = f.invoke(start, Reflector.prepRet(_ct, _array[_i])); for (int x = _i + 1; x < _array.Length; x++) { ret = f.invoke(ret, Reflector.prepRet(_ct, _array[x])); } return(ret); }
public object reduce(IFn f, object start) { object ret = f.invoke(start, Reflector.prepRet(_ct, _a.GetValue(_i))); for (int x = _i + 1; x < _a.Length; x++) { ret = f.invoke(ret, Reflector.prepRet(_ct, _a.GetValue(x))); } return(ret); }
public override int IndexOf(object value) { int n = _a.Length; for (int j = _i; j < n; j++) { if (Util.equals(value, Reflector.prepRet(_ct, _a.GetValue(j)))) { return(j - _i); } } return(-1); }
public override object first() { return(Reflector.prepRet(_ct, _array[_i])); }
public override object first() { return(Reflector.prepRet(_ct, _a.GetValue(_i))); }