DefineDocument() public method

public DefineDocument ( string url, System.Guid language, System.Guid languageVendor, System.Guid documentType ) : SymDocumentWriter
url string
language System.Guid
languageVendor System.Guid
documentType System.Guid
return SymDocumentWriter
示例#1
0
        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);
        }
示例#2
0
        SymDocumentWriter GetDocument(Document document)
        {
            if (document == null)
            {
                return(null);
            }

            SymDocumentWriter doc_writer;

            if (documents.TryGetValue(document.Url, out doc_writer))
            {
                return(doc_writer);
            }

            var url = document.Url;

            if (sourcePathRewriter != null)
            {
                url = sourcePathRewriter(url);
            }

            doc_writer = writer.DefineDocument(
                url,
                document.Language.ToGuid(),
                document.LanguageVendor.ToGuid(),
                document.Type.ToGuid());

            documents [document.Url] = doc_writer;
            return(doc_writer);
        }
示例#3
0
        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);
        }
示例#4
0
        SymDocumentWriter GetDocument(Document document)
        {
            if (document == null)
            {
                return(null);
            }

            SymDocumentWriter docWriter = m_documents[document.Url] as SymDocumentWriter;

            if (docWriter != null)
            {
                return(docWriter);
            }

            docWriter = m_writer.DefineDocument(
                document.Url,
                document.Language,
                document.LanguageVendor,
                document.Type);

            m_documents [document.Url] = docWriter;
            return(docWriter);
        }