public EMDocument Get(string path) { FailWhenDisposed(); if (IsCurrentFile(path)) { return(CurrentFileDocument); } linkedFilesCacheLock.EnterWriteLock(); try { ProcessedDocumentCacheElement output; if (!linkedFilesCache.TryGetValue(path, out output)) { output = new ProcessedDocumentCacheElement(path, TransformationData.Markdown.Preprocessor, this); linkedFilesCache.Add(path, output); } return(output.Document); } finally { linkedFilesCacheLock.ExitWriteLock(); } }
public EMDocument Get(string path) { FailWhenDisposed(); if (IsCurrentFile(path)) { return CurrentFileDocument; } linkedFilesCacheLock.EnterWriteLock(); try { ProcessedDocumentCacheElement output; if (!linkedFilesCache.TryGetValue(path, out output)) { output = new ProcessedDocumentCacheElement(path, TransformationData.Markdown.Preprocessor, this); linkedFilesCache.Add(path, output); } return output.Document; } finally { linkedFilesCacheLock.ExitWriteLock(); } }