private static OleDbCommand GetCommand(VfpDataReader vfpDataReader) { if (vfpDataReader == null) { return(null); } var oleDbDataReader = vfpDataReader._dbDataReader as OleDbDataReader; if (oleDbDataReader == null) { return(null); } var propertyInfo = typeof(OleDbDataReader).GetProperty("Command", BindingFlags.NonPublic | BindingFlags.GetProperty | BindingFlags.Instance); return((OleDbCommand)propertyInfo.GetValue(oleDbDataReader, null)); }
public SchemaFixer(VfpDataReader vfpDataReader) { _command = GetCommand(vfpDataReader); }