public bool get_value(int col, int row, out TVal val) { TRow r; if (!_rows.get_value(row, out r)) { val = default(TVal); return(false); } else { val = r[col]; return(true); } }
public bool get_value(int row, out T val) { if (_cache.TryGetValue(row, out val)) { return(true); } else { if (_cd.get_value(row, out val)) { _cache [row] = val; return(true); } else { return(false); } } }
public bool get_value(int col, int row, out TVal val) { TRow r; if (!_rows.get_value(row, out r)) { val = default(TVal); return(false); } string propname = _map[col]; if (propname == null) { // TODO what if there is no propname for the given column? return value not found. val = default(TVal); return(false); } var typ = typeof(TRow); var ti = typ.GetTypeInfo(); var p = ti.GetDeclaredProperty(propname); if (p == null) { // TODO what? throw? return value not found? val = default(TVal); return(false); } TVal v = (TVal)p.GetValue(r); // TODO is this cast safe? does this function work for anything but strings? val = v; return(true); }
public bool get_value(int row, out T val) { return(_next.get_value(row, out val)); }