Beispiel #1
0
        private static IEnumerable<Script> ScanForScripts(MigrationInfo migrationInfo, string migrationFolder, IScriptScanner scanner)
        {
            var environments = (migrationInfo.TargetEnvironment ?? Enumerable.Empty<string>()).ToArray();
            var scripts = (scanner.Scan(migrationInfo.ScriptFolder.Whack(migrationFolder), environments) ?? Enumerable.Empty<Script>()).ToArray();

            Output.Text("Found {0} '{1}' scripts.".FormatWith(scripts.Length, migrationFolder));

            foreach (var script in scripts)
            {
                Output.Verbose(script.Name, 1);
            }

            return scripts;
        }
Beispiel #2
0
        private static IEnumerable <Script> ScanForScripts(MigrationInfo migrationInfo, string migrationFolder, IScriptScanner scanner)
        {
            var environments = (migrationInfo.TargetEnvironment ?? Enumerable.Empty <string>()).ToArray();
            var scripts      = (scanner.Scan(migrationInfo.ScriptFolder.Whack(migrationFolder), environments) ?? Enumerable.Empty <Script>()).ToArray();

            Output.Text("Found {0} '{1}' scripts.".FormatWith(scripts.Length, migrationFolder));

            foreach (var script in scripts)
            {
                Output.Verbose(script.Name, 1);
            }

            return(scripts);
        }
 public virtual void SetUp()
 {
     MockFilesystem = new Mock <IFilesystem>();
     Scanner        = new DownScriptScanner(MockFilesystem.Object);
 }
 public virtual void SetUp()
 {
     MockFilesystem = new Mock<IFilesystem>();
     Scanner = new DownScriptScanner(MockFilesystem.Object);
 }