示例#1
0
        private static void ConfigureScriptingSources(AppOptions options, Scripter scripter)
        {
            if (options.ScriptFunctions)
            {
                scripter.AddSources(
                    new ScriptingSource("Functions", (srvr, db) => srvr.GetUserDefinedFunctions(db))
                );
            }

            if (options.ScriptStoredProcedures)
            {
                scripter.AddSources(
                    new ScriptingSource("Sprocs", (srvr, db) => srvr.GetStoredProcedures(db))
                );
            }

            if (options.ScriptTables)
            {
                scripter.AddSources(
                    new ScriptingSource("Tables", (srvr, db) => srvr.GetTables(db))
                );
            }

            if (options.ScriptViews)
            {
                scripter.AddSources(
                    new ScriptingSource("Views", (srvr, db) => srvr.GetViews(db))
                );
            }
        }
示例#2
0
        private static void ConfigureScriptingSources(AppOptions options, Scripter scripter)
        {
            if (options.ScriptFunctions)
            {
                scripter.AddSources(
                    new ScriptingSource("Functions", (srvr, db) => srvr.GetUserDefinedFunctions(db))
                    );
            }

            if (options.ScriptStoredProcedures)
            {
                scripter.AddSources(
                    new ScriptingSource("Sprocs", (srvr, db) => srvr.GetStoredProcedures(db))
                    );
            }

            if (options.ScriptTables)
            {
                scripter.AddSources(
                    new ScriptingSource("Tables", (srvr, db) => srvr.GetTables(db))
                    );
            }

            if (options.ScriptViews)
            {
                scripter.AddSources(
                    new ScriptingSource("Views", (srvr, db) => srvr.GetViews(db))
                    );
            }
        }