Esempio n. 1
0
            public override string ResolveReference(string reference, string baseFilePath)
            {
                var path = _resolver.ResolveReference(reference, baseFilePath);

                if (path != null)
                {
                    _logger.AddRead(path);
                }
                return(path);
            }
Esempio n. 2
0
        public override ImmutableArray <PortableExecutableReference> ResolveReference(string reference, string baseFilePath, MetadataReferenceProperties properties)
        {
            var path = PathResolver.ResolveReference(reference, baseFilePath);

            if (path == null)
            {
                return(ImmutableArray <PortableExecutableReference> .Empty);
            }

            return(ImmutableArray.Create(Provider.GetReference(path, properties)));
        }
            /// <summary>
            /// When compiling to a file all relative paths have to match one of the file references specified on command line.
            /// </summary>
            private string ResolveMetadataFile(string path, string basePath)
            {
                var fullPath = _resolver.ResolveReference(path, basePath);

                foreach (var fileReference in _availableReferences)
                {
                    if (string.Equals(fileReference.FilePath, fullPath, StringComparison.OrdinalIgnoreCase))
                    {
                        return(fullPath);
                    }
                }

                return(null);
            }