Beispiel #1
0
        private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
        {
            List <string> providersToRemove = new List <string>();

            switch (dbTag)
            {
            case DeploymentWellKnownTag.MySql:
                providersToRemove.Add("dbFullSql");
                providersToRemove.Add("DBSqlite");
                break;

            case DeploymentWellKnownTag.Sql:
                providersToRemove.Add("dbMySql");
                providersToRemove.Add("DBSqlite");
                break;

            case DeploymentWellKnownTag.FlatFile:
                providersToRemove.Add("dbFullSql");
                providersToRemove.Add("DBSqlite");
                providersToRemove.Add("dbMySql");
                break;

            case DeploymentWellKnownTag.SqLite:
                providersToRemove.Add("dbFullSql");
                providersToRemove.Add("dbMySql");
                break;

            case DeploymentWellKnownTag.VistaDB:
                providersToRemove.Add("dbFullSql");
                providersToRemove.Add("DBSqlite");
                providersToRemove.Add("dbMySql");
                break;

            case DeploymentWellKnownTag.SqlCE:
                providersToRemove.Add("dbFullSql");
                providersToRemove.Add("DBSqlite");
                providersToRemove.Add("dbMySql");
                break;

            default:
                break;
            }

            foreach (string provider in providersToRemove)
            {
                msDeployPackage.SkipDirectives.Add(string.Format("objectName={0}", provider));
            }
        }
Beispiel #2
0
        private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
        {
            List<string> providersToRemove = new List<string>();

            switch (dbTag)
            {
                case DeploymentWellKnownTag.MySql:
                    providersToRemove.Add("dbFullSql");
                    providersToRemove.Add("DBSqlite");
                    break;
                case DeploymentWellKnownTag.Sql:
                    providersToRemove.Add("dbMySql");
                    providersToRemove.Add("DBSqlite");
                    break;
                case DeploymentWellKnownTag.FlatFile:
                    providersToRemove.Add("dbFullSql");
                    providersToRemove.Add("DBSqlite");
                    providersToRemove.Add("dbMySql");
                    break;
                case DeploymentWellKnownTag.SqLite:
                    providersToRemove.Add("dbFullSql");
                    providersToRemove.Add("dbMySql");
                    break;
                case DeploymentWellKnownTag.VistaDB:
                    providersToRemove.Add("dbFullSql");
                    providersToRemove.Add("DBSqlite");
                    providersToRemove.Add("dbMySql");
                    break;
                case DeploymentWellKnownTag.SqlCE:
                    providersToRemove.Add("dbFullSql");
                    providersToRemove.Add("DBSqlite");
                    providersToRemove.Add("dbMySql");
                    break;
                default:
                    break;
            }

            foreach (string provider in providersToRemove)
            {
                msDeployPackage.SkipDirectives.Add(string.Format("objectName={0}", provider));
            }
        }