Import from internal git
This commit is contained in:
31
Generator/Controllers/ExportController.cs
Normal file
31
Generator/Controllers/ExportController.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Core;
|
||||
using Core.Events;
|
||||
using Core.Interfaces;
|
||||
using Generator.Services;
|
||||
using Generator.views;
|
||||
|
||||
namespace Generator.Controllers;
|
||||
|
||||
public class ExportController : IController
|
||||
{
|
||||
private readonly ExportService _exportService;
|
||||
public DisplayEmitter Emitter { get; set; }
|
||||
|
||||
public ExportController(DisplayEmitter emitter, ExportService service)
|
||||
{
|
||||
_exportService = service;
|
||||
Emitter = emitter;
|
||||
}
|
||||
|
||||
public void PlantUml(ISpecFile file)
|
||||
{
|
||||
try
|
||||
{
|
||||
_exportService.ExportAsPuml(file);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Emitter.Warn(this, $"{e.Message} \n Cause : {e.Source} \n Full stacktrace : \n {e.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user