private ISymUnmanagedDocumentWriter GetDocumentWriterFor(IPrimarySourceDocument document) {
Contract.Requires(document != null);
Contract.Requires(document != SourceDummy.PrimarySourceDocument);
ISymUnmanagedDocumentWriter writer;
if (!this.documentMap.TryGetValue(document, out writer)) {
Guid language = document.Language;
Guid vendor = document.LanguageVendor;
Guid type = document.DocumentType;
writer = this.SymWriter.DefineDocument(document.Location, ref language, ref vendor, ref type);
this.documentMap.Add(document, writer);
}
return writer;
}