| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | |
| 3 | namespace WixToolset.Extensibility.Services |
| 4 | { |
| 5 | using System.Collections.Generic; |
| 6 | using WixToolset.Data; |
| 7 | using WixToolset.Extensibility.Data; |
| 8 | |
| 9 | /// <summary> |
| 10 | /// Interface to resolve file paths using extensions and bind paths. |
| 11 | /// </summary> |
| 12 | public interface IFileResolver |
| 13 | { |
| 14 | /// <summary> |
| 15 | /// Resolves the source path of a file using binder extensions. |
| 16 | /// </summary> |
| 17 | /// <param name="source">Original source value.</param> |
| 18 | /// <param name="librarianExtensions">Extensions used to resolve the file path.</param> |
| 19 | /// <param name="bindPaths">Collection of bind paths for the binding stage.</param> |
| 20 | /// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param> |
| 21 | /// <param name="symbolDefinition">Optional type of source file being resolved.</param> |
| 22 | /// <returns>Should return a valid path for the stream to be imported.</returns> |
| 23 | string ResolveFile(string source, IEnumerable<ILibrarianExtension> librarianExtensions, IEnumerable<IBindPath> bindPaths, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition); |
| 24 | |
| 25 | /// <summary> |
| 26 | /// Resolves the source path of a file using binder extensions. |
| 27 | /// </summary> |
| 28 | /// <param name="source">Original source value.</param> |
| 29 | /// <param name="resolverExtensions">Extensions used to resolve the file path.</param> |
| 30 | /// <param name="bindPaths">Collection of bind paths for the binding stage.</param> |
| 31 | /// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param> |
| 32 | /// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param> |
| 33 | /// <param name="symbolDefinition">Optional type of source file being resolved.</param> |
| 34 | /// <param name="alreadyCheckedPaths">Optional collection of paths already checked.</param> |
| 35 | /// <returns>Should return a valid path for the stream to be imported.</returns> |
| 36 | string ResolveFile(string source, IEnumerable<IResolverExtension> resolverExtensions, IEnumerable<IBindPath> bindPaths, BindStage bindStage, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, IEnumerable<string> alreadyCheckedPaths = null); |
| 37 | } |
| 38 | } |