Пример #1
0
        public override string NormalizePath(string path, string baseFilePath)
        {
            if (path.StartsWith("nuget:", StringComparison.OrdinalIgnoreCase))
            {
                return(path);
            }

            return(_sourceReferenceResolver.NormalizePath(path, baseFilePath));
        }
Пример #2
0
            /// <summary>
            /// Normalizes specified source path with respect to base file path.
            /// </summary>
            /// <param name="path">The source path to normalize. May be absolute or relative.</param>
            /// <param name="baseFilePath">Path of the source file that contains the <paramref name="path" /> (may also be relative), or null if not available.</param>
            /// <returns>
            /// Normalized path, or null if <paramref name="path" /> can't be normalized. The resulting path doesn't need to exist.
            /// </returns>
            public override string NormalizePath(string path, string baseFilePath)
            {
                // Try to see if it is import user type options
                ImportUserTypeOptions options = ImportUserTypeOptions.ParseString(path);

                if (options != null)
                {
                    return(options.Serialize());
                }

                // Normalize path
                string result = originalSourceResolver.NormalizePath(path, baseFilePath);

                return(result);
            }
Пример #3
0
        internal string NormalizeDebugDocumentPath(string path, string basePath)
        {
            if (_resolverOpt == null)
            {
                return(path);
            }

            (string, string)key = (path, basePath);
            if (!_normalizedPathsCache.TryGetValue(key, out string normalizedPath))
            {
                normalizedPath = _resolverOpt.NormalizePath(path, basePath) ?? path;
                _normalizedPathsCache.TryAdd(key, normalizedPath);
            }

            return(normalizedPath);
        }
Пример #4
0
            public override string NormalizePath(string path, string baseFilePath)
            {
                string result = originalSourceResolver.NormalizePath(path, baseFilePath);

                return(result);
            }
Пример #5
0
 public override string NormalizePath(string path, string baseFilePath)
 {
     return(_inner.NormalizePath(path, baseFilePath));
 }