public void Initialize() { Task.Run(() => { foreach (var file in Flatten().Where(IsRootLevelDocument)) { _Documents.AddOrUpdate(file, f => DocumentManager.Get(f), (f, d) => d); } }); }
ISassEditor Create(ITextBuffer buffer) { ITextDocument document; if (buffer.Properties.TryGetProperty(typeof(ITextDocument), out document)) { var sassDocument = DocumentManager.Get(new FileInfo(document.FilePath)); var cache = IntellisenseManager.Get(sassDocument); return(new SassEditor(buffer, sassDocument, cache, ParsingTask)); } return(null); }
public ActionResult DeleteDoc(long id, string originalFileName) { var document = documentManager.Get(id) as Document; if (document == null) { PartialView("Documents"); } documentManager.Delete(document); var fullPath = Request.MapPath("~/Files/" + originalFileName); if (System.IO.File.Exists(fullPath)) { System.IO.File.Delete(fullPath); } return(PartialView("Documents", documentManager.GetList())); }