Esempio n. 1
0
        private TSqlModel BuildActualModel()
        {
            var model = new TSqlModel(_outputPath);

            foreach (var source in _sourceFolder)
            {
                var finder = new ScriptFinder(source.Path, source.Filter);

                foreach (var script in finder.GetScripts(ScriptFixer))
                {
                    try
                    {
                        if (!_alreadyAdded.ContainsKey(script))
                        {
                            model.AddObjects(script);
                        }

                        _alreadyAdded[script] = true;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error adding script: {0}, script:\r\n{1}", e.Message, script);
                    }
                }
            }


            return(model);
        }
Esempio n. 2
0
        private TSqlModel BuildActualModel()
        {
            var model = new TSqlModel(_outputPath);

            foreach (var source in _sourceFolder)
            {
                var finder = new ScriptFinder(source.Path, source.Filter);

                foreach (var script in finder.GetScripts(ScriptFixer))
                {
                    try
                    {
                        if(!_alreadyAdded.ContainsKey(script))
                            model.AddObjects(script);

                        _alreadyAdded[script] = true;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error adding script: {0}, script:\r\n{1}", e.Message, script);
                    }
                }
            }

            return model;
        }