public DesignTimeHostCompiler(ApplicationShutdown shutdown, IFileWatcher watcher, Stream stream) { _shutdown = shutdown; _queue = new ProcessingQueue(stream); _queue.ProjectCompiled += OnProjectCompiled; _queue.ProjectsInitialized += ProjectContextsInitialized; _queue.ProjectChanged += _ => shutdown.RequestShutdownWaitForDebugger(); _queue.ProjectSources += files => { foreach (var file in files) { watcher.WatchFile(file); } }; _queue.Error += OnError; _queue.Closed += OnClosed; _queue.Start(); var obj = new JObject(); obj["Version"] = 1; _queue.Send(new DesignTimeMessage { HostId = "Application", MessageType = "EnumerateProjectContexts", Payload = obj }); }
public DesignTimeHostCompiler(IApplicationShutdown shutdown, Stream stream) { _queue = new ProcessingQueue(stream); _queue.ProjectCompiled += OnProjectCompiled; _queue.ProjectsInitialized += ProjectContextsInitialized; _queue.ProjectChanged += _ => shutdown.RequestShutdown(); _queue.Closed += OnClosed; _queue.Start(); _queue.Send(new DesignTimeMessage { HostId = "Application", MessageType = "EnumerateProjectContexts" }); }
public DesignTimeHostCompiler(IApplicationShutdown shutdown, IFileWatcher watcher, Stream stream) { _shutdown = shutdown; _watcher = watcher; _queue = new ProcessingQueue(stream); _queue.ProjectCompiled += OnProjectCompiled; _queue.ProjectsInitialized += ProjectContextsInitialized; _queue.ProjectChanged += _ => { }; _queue.ProjectSources += files => { foreach (var file in files) { watcher.WatchFile(file); } }; _queue.Error += OnError; _queue.Closed += OnClosed; _queue.Start(); _queue.Send(new EnumerateProjectContextsMessage()); }
public DesignTimeHostCompiler(IApplicationShutdown shutdown, IFileWatcher watcher, Stream stream) { _queue = new ProcessingQueue(stream); _queue.ProjectCompiled += OnProjectCompiled; _queue.ProjectsInitialized += ProjectContextsInitialized; _queue.ProjectChanged += _ => shutdown.RequestShutdown(); _queue.ProjectSources += files => { foreach (var file in files) { watcher.WatchFile(file); } }; _queue.Closed += OnClosed; _queue.Start(); _queue.Send(new DesignTimeMessage { HostId = "Application", MessageType = "EnumerateProjectContexts" }); }