// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.usingSystem;usingSystem.Collections.Generic;usingSystem.Collections.Immutable;usingSystem.IO;usingMicrosoft.CodeAnalysis;namespaceRoslyn.Test.Utilities{internalsealedclassVirtualizedRelativePathResolver:RelativePathResolver{privatereadonlyHashSet<string>_existingFullPaths;publicVirtualizedRelativePathResolver(IEnumerable<string>existingFullPaths,stringbaseDirectory=null,ImmutableArray<string>searchPaths=default(ImmutableArray<string>)):base(searchPaths.NullToEmpty(),baseDirectory){_existingFullPaths=newHashSet<string>(existingFullPaths,StringComparer.Ordinal);}protectedoverrideboolFileExists(stringfullPath){// normalize path to remove '..' and '.'return_existingFullPaths.Contains(Path.GetFullPath(fullPath));}}}