public void Execute() { var doc = App.Document() as CodeDocument; var wrap = default(BackgroundCompiler); if (doc != null && doc.UnitVersion != doc.Version && CompilerInstances.TryGetValue(doc.CodeEditor.Key, out wrap) && EnableBackgroundCompilation) { wrap.Compile(doc); } }
private void DocumentOpened(Document doc) { var inf = App.EditorInfo(doc); var wrap = default(BackgroundCompiler); if (inf.Instance is ICodeEditor && CompilerInstances.TryGetValue(inf.Key, out wrap) && EnableBackgroundCompilation) { wrap.CompileAlways((CodeDocument)doc); } }