public ScriptGenerationServer(IScriptGenerationService service, int port, ILoggerFactory loggerFactory) { _logger = loggerFactory?.CreateLogger(typeof(ScriptGenerationServer)) ?? NullLogger.Instance; _cancellationTokenSource = new CancellationTokenSource(); _service = service ?? throw new ArgumentNullException(nameof(service)); _port = port; }
public ScriptGenerator(IWordService wordWorker, ICharConverterService charConverterService, IVersioningService versioningService, IScriptGenerationService scriptGenerationService, ICodeComponentsGeneratorService aisComponentsGeneratorService) { this.wordService = wordWorker; this.charConverterService = charConverterService; this.versioningService = versioningService; this.scriptGenerationService = scriptGenerationService; this.aisComponentsGeneratorService = aisComponentsGeneratorService; InitializeWindow(); }
static int Main(string[] args) { var isRunningOnMono = Type.GetType("Mono.Runtime") != null; var loggerFactory = new LoggerFactory() .AddConsole(Microsoft.Extensions.Logging.LogLevel.Debug); var bakeryPath = args[0]; workingDirectory = Environment.CurrentDirectory.Replace('\\', '/');; service = isRunningOnMono ? new ScriptGenerationClient(new MonoScriptGenerationProcess(bakeryPath, loggerFactory), workingDirectory, loggerFactory) : new ScriptGenerationClient(bakeryPath, workingDirectory, loggerFactory); Should_Generate_From_File(); Should_Generate_From_Buffer(); Should_Generate_With_Line_Changes(); Should_Install_Addins(); return(0); }
static int Main(string[] args) { var isRunningOnMono = !string.IsNullOrWhiteSpace(MonoRuntime); using var loggerFactory = LoggerFactory.Create( builder => builder .AddConsole() .SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Debug)); var bakeryPath = args[0]; workingDirectory = Environment.CurrentDirectory.Replace('\\', '/');; service = isRunningOnMono ? new ScriptGenerationClient(new MonoScriptGenerationProcess(bakeryPath, loggerFactory), workingDirectory, loggerFactory) : new ScriptGenerationClient(bakeryPath, workingDirectory, loggerFactory); Should_Generate_From_File(); Should_Generate_From_Buffer(); Should_Generate_With_Line_Changes(); Should_Install_Addins(); return(0); }
public InProcessServer(IScriptGenerationService service, ILoggerFactory loggerFactory) { _service = service; _loggerFactory = loggerFactory; }