SymDocumentWriter GetDocument(Document document) { if (document == null) { return(null); } SymDocumentWriter doc_writer; if (documents.TryGetValue(document.Url, out doc_writer)) { return(doc_writer); } doc_writer = writer.DefineDocument( document.Url, document.LanguageGuid, document.LanguageVendorGuid, document.TypeGuid); if (!document.Hash.IsNullOrEmpty()) { doc_writer.SetCheckSum(document.HashAlgorithmGuid, document.Hash); } documents [document.Url] = doc_writer; return(doc_writer); }
SymDocumentWriter GetDocument(Document document) { if (document == null) { return(null); } SymDocumentWriter doc_writer; if (documents.TryGetValue(document.Url, out doc_writer)) { return(doc_writer); } doc_writer = writer.DefineDocument( document.Url, document.LanguageGuid, document.LanguageVendorGuid, document.TypeGuid); documents [document.Url] = doc_writer; return(doc_writer); }