Exemple #1
0
 public static IDbServerFactory CreateDbServerFactory(DatabaseServerType serverType)
 {
     switch (serverType)
     {
         case DatabaseServerType.Undefined:
             throw new ArgumentException("Cannot create an IDbServerFactory for DatabaseServerType." + serverType.ToString());
         case DatabaseServerType.SqlServer:
             return new SqlServerDbServerFactory(DatabaseServerType.SqlServer);
         //case DatabaseServerType.Informix:
         //    return new DbServerFactoryInformix(DatabaseServerType.Informix);
         default:
             throw new NotImplementedException("Implementation missing for enumerated type DatabaseServerType." + serverType.ToString());
     }
 }
 public SqlServerDbServerFactory(DatabaseServerType serverType)
 {
     if (serverType != this.ServerType)
         throw new ArgumentException("ServerType" + serverType.ToString() + " is wrong for this class.", "serverType");
 }