示例#1
0
        public string GetReferencePath(MetadataReferenceInfo referenceInfo)
        {
            if (_cache.TryGetValue(referenceInfo.Mvid, out var value))
            {
                return(value);
            }

            throw new Exception($"Could not find referenced assembly {referenceInfo}");
        }
        public MetadataReference ResolveMetadataReference(MetadataReferenceInfo metadataReferenceInfo)
        {
            if (!ReferenceResolver.TryResolveReferences(metadataReferenceInfo, out var metadataReference))
            {
                throw new InvalidOperationException($"Could not resolve reference: {metadataReferenceInfo.FileName}");
            }

            return(metadataReference);
        }