private string BuildCachedDocumentFolderPath(CachedDocumentDescription cachedPageDescription) { string path = cachedPageDescription.Guid.Contains(CacheFolderName) ? cachedPageDescription.Guid.Replace(CacheFolderName, string.Empty) : cachedPageDescription.Guid; string relativePath = ToRelativeDirectoryName(path); return(Path.Combine(CacheFolderName, relativePath)); }
private string GetDocumentFilePath(CacheFileDescription cacheFileDescription) { CachedDocumentDescription document = cacheFileDescription as CachedDocumentDescription; if (document == null) { throw new InvalidOperationException( "cacheFileDescription object should be an instance of CachedDocumentDescription class"); } string documentName = document.Name.Equals("document") && (document.OutputExtension.Equals("pdf") || document.OutputExtension.Equals(".pdf")) ? PdfFileName : Path.ChangeExtension(document.Name, document.OutputExtension); string documentFolder = BuildCachedDocumentFolderPath(document); return(Path.Combine(documentFolder, documentName)); }
public void SaveDocument(CachedDocumentDescription description, Stream stream) { //TODO }