public CodeFileCompilationHandlerCSharp(IWorkspaceManager workspaceManager, IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger) { this.workspaceManager = workspaceManager; this.pipelineExecutionInfo = pipelineExecutionInfo; this.logger = logger; this.compilationHandler = new WorkspaceCompilationHandler(workspaceManager); }
public CodeFileEnvironmentHandlerTs( IFileSystem fileSystem, ICodeFileStorageHandler codeFileStorageHandler, ICodeFileCompilationHandler codeFileCompilationHandler, IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger) : base(codeFileStorageHandler, codeFileCompilationHandler) { this.fileSystem = fileSystem; this.tsHost = new TsHost(30050, 30100, 5000, new TsHostLoggerAdapter(logger)); }
private IPipelineEnvironment CreatePipelineEnvironment(IPipelineExecutionInfo pipelineExecutionInfo, PipelineConfiguration configuration) { var result = new PipelineEnvironment(pipelineExecutionInfo); foreach (var handlerRegistration in configuration.CodeFileHandlerTypeRegistrations) { Type type = Type.GetType(handlerRegistration.Type); if (type is null) { throw new InvalidOperationException($"Cannot resolve CodeFileHandler type {handlerRegistration.Type}."); } var codeFileHandlerFactory = Activator.CreateInstance(type) as ICodeFileEnvironmentHandlerFactory; if (codeFileHandlerFactory == null) { throw new InvalidOperationException($"CodeFileHandler type {handlerRegistration.Type} should implement {typeof(ICodeFileEnvironmentHandlerFactory)} interface."); } var handler = codeFileHandlerFactory.Create(this.workspaceManagers.ProcessingWorkspace, this.fileSystem, pipelineExecutionInfo, this.logger, handlerRegistration.Configuration); result.Handlers.Add(handler); } return(result); }
public List <ICodeStream> Execute(IEnumerable <CodeFile> inputs, IMetadataWriter metadataWriter, IMetadataReader metadataReader, ICodeStreamFactory codeStreamFactory, IPipelineExecutionInfo pipelineExecutionInfo) { this.logger.Write(new LogRecord(MessageSeverity.Information, $"Starting plugin: {this.Plugin?.Signature?.Id} - {this.Plugin?.Signature?.Name}")); var metadataRecorder = new MetadataRecorder(metadataWriter, pipelineExecutionInfo, this.Plugin.Signature.Id); var result = this.Plugin.InitializeOutputs(codeStreamFactory); this.Plugin.Execute(inputs, metadataRecorder, metadataReader, this.logger); return(result); }
public MetadataRecorder(IMetadataWriter metadataWriter, IPipelineExecutionInfo pipelineExecutionInfo, string pluginId) { this.metadataWriter = metadataWriter; this.pipelineExecutionInfo = pipelineExecutionInfo; this.pluginId = pluginId; }
public ICodeFileEnvironmentHandler Create(IWorkspaceManager workspaceManager, IFileSystem fileSystem, IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger, JObject configuration = null) { return(new CodeFileEnvironmentHandlerCSharp(workspaceManager, pipelineExecutionInfo, logger)); }
public CodeFileEnvironmentHandlerTs(IFileSystem fileSystem, IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger) : this(fileSystem, new CodeFileStorageHandlerTs(fileSystem), new CodeFileCompilationHandlerTs(pipelineExecutionInfo, logger), pipelineExecutionInfo, logger) { }
public CodeFileEnvironmentHandlerCSharp(IWorkspaceManager workspaceManager, IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger) : base(workspaceManager, new CodeFileCompilationHandlerCSharp(workspaceManager, pipelineExecutionInfo, logger)) { }
public CodeFileCompilationHandlerTs(IPipelineExecutionInfo pipelineExecutionInfo, ILogger logger) { this.pipelineExecutionInfo = pipelineExecutionInfo; this.logger = logger; }
public PipelineEnvironment(IPipelineExecutionInfo pipelineExecutionInfo) { this.PipelineExecutionInfo = pipelineExecutionInfo; }