Beispiel #1
0
 private void Print(FolderSearcher searcher, IEnumerable <string> seenProcs, int level)
 {
     _log($"{Padding(level)}{ConstructSPName()}");
     foreach (var innderProc in FindInner(searcher))
     {
         if (seenProcs.Contains(innderProc.ConstructSPName()))
         {
             _log($"{Padding(level + 1)}{innderProc.ConstructSPName()}...");
         }
         else
         {
             innderProc.Print(searcher, seenProcs.Concat(new[] { innderProc.ConstructSPName() }), level + 1);
         }
     }
 }
Beispiel #2
0
 private IEnumerable <StoredProcedureInfo> FindInner(FolderSearcher searcher) =>
 EnumerateInnerProcedures()
 .Select(d => searcher.Search(d.Name, d.Schema))
 .Where(a => a != null);
Beispiel #3
0
 public void Print(FolderSearcher searcher) => Print(searcher, new List <string>(), 0);
Beispiel #4
0
 public StoredProcedureMapper(string path, Action <string> log)
 {
     _searcher = new FolderSearcher(path, log);
 }