public DebugSourceInfo(
     ImmutableArray <byte> checksum,
     SourceHashAlgorithm checksumAlgorithm,
     ImmutableArray <byte> embeddedTextBlob = default)
     : this(checksum, SourceHashAlgorithms.GetAlgorithmGuid(checksumAlgorithm), embeddedTextBlob)
 {
 }
Exemple #2
0
        static Cci.DebugSourceDocument CreateDebugSourceDocument(string normalizedPath, MethodSymbol method)
        {
            // TODO: method might be synthesized and we create an incomplete DebugSourceDocument

            var srcf = (method as SourceRoutineSymbol)?.ContainingFile;

            if (srcf != null && srcf.SyntaxTree.TryGetText(out var srctext))
            {
                return(new Cci.DebugSourceDocument(
                           normalizedPath,
                           Constants.CorSymLanguageTypePeachpie,
                           srctext.GetChecksum(),
                           SourceHashAlgorithms.GetAlgorithmGuid(srctext.ChecksumAlgorithm)));
            }
            else
            {
                return(new Cci.DebugSourceDocument(normalizedPath, Constants.CorSymLanguageTypePeachpie));
            }
        }