Добавлены mermaid диаграммы
This commit is contained in:
41
SQLLinter/Diagramer.cs
Normal file
41
SQLLinter/Diagramer.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using SQLLinter.Common.Helpers;
|
||||
using SQLLinter.Core.Interfaces;
|
||||
using SQLLinter.Infrastructure.Diagram;
|
||||
using SQLLinter.Infrastructure.Interfaces;
|
||||
|
||||
namespace SQLLinter;
|
||||
|
||||
public class Diagramer
|
||||
{
|
||||
private ISqlDiagramProcessor _diagramProcessor;
|
||||
|
||||
public Diagramer(BpmnDiagram bpmnDiagram
|
||||
, IFragmentBuilder fragmentBuilder
|
||||
, ISqlStreamReaderBuilder sqlStreamReaderBuilder
|
||||
)
|
||||
{
|
||||
_diagramProcessor = new SqlDiagramProcessor(fragmentBuilder, bpmnDiagram, sqlStreamReaderBuilder);
|
||||
}
|
||||
|
||||
public void Run(string filePath)
|
||||
{
|
||||
this.Run([filePath]);
|
||||
}
|
||||
|
||||
public void Run(List<string> filePaths)
|
||||
{
|
||||
List<string> files = FileHelpers.FindFilesWithMask(filePaths);
|
||||
|
||||
_diagramProcessor.ProcessList(filePaths);
|
||||
}
|
||||
|
||||
public void Run(string fileName, Stream fileReader)
|
||||
{
|
||||
Run(new Dictionary<string, Stream> { [fileName] = fileReader });
|
||||
}
|
||||
|
||||
public void Run(Dictionary<string, Stream> files)
|
||||
{
|
||||
_diagramProcessor.ProcessList(files);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user