static ISQLAnalysisFactory GetSQLAnalysisFactory(DbTypeEnum dbType) { ISQLAnalysisFactory factory = null; switch (dbType) { case DbTypeEnum.MySQL: factory = new MySQLAnalysisFactory(); break; case DbTypeEnum.Sybase: factory = new SybaseAnalysisFactory(); break; case DbTypeEnum.MSSQLServer: factory = new MSSQLServerAnalysisFactory(); break; case DbTypeEnum.Oracle: throw new NotImplementedException("暂不支持Oracle数据库!"); } return factory; }
public void MethodInit() { ISQLAnalysisFactory factory = new SybaseAnalysisFactory(); _provider = factory.GetDbStructAnalysisProvider(); }