コード例 #1
0
ファイル: Program.cs プロジェクト: nick-randal/UsefulCSharp
        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
ファイル: Program.cs プロジェクト: gungledeezer/UsefulCSharp
        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))
                    );
            }
        }