| 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.Harvesters.Extensibility |
| 4 | { |
| 5 | using WixToolset.Extensibility.Services; |
| 6 | |
| 7 | /// <summary> |
| 8 | /// The WiX Toolset harvester core. |
| 9 | /// </summary> |
| 10 | public interface IHarvesterCore |
| 11 | { |
| 12 | /// <summary> |
| 13 | /// |
| 14 | /// </summary> |
| 15 | IMessaging Messaging { get; set; } |
| 16 | |
| 17 | /// <summary> |
| 18 | /// Gets or sets the value of the extension argument passed to heat. |
| 19 | /// </summary> |
| 20 | /// <value>The extension argument.</value> |
| 21 | string ExtensionArgument { get; set; } |
| 22 | |
| 23 | /// <summary> |
| 24 | /// Gets or sets the value of the root directory that is being harvested. |
| 25 | /// </summary> |
| 26 | /// <value>The root directory being harvested.</value> |
| 27 | string RootDirectory { get; set; } |
| 28 | |
| 29 | /// <summary> |
| 30 | /// Create an identifier based on passed file name |
| 31 | /// </summary> |
| 32 | /// <param name="filename">File name to generate identifer from</param> |
| 33 | /// <returns></returns> |
| 34 | string CreateIdentifierFromFilename(string filename); |
| 35 | |
| 36 | /// <summary> |
| 37 | /// Generate an identifier by hashing data from the row. |
| 38 | /// </summary> |
| 39 | /// <param name="prefix">Three letter or less prefix for generated row identifier.</param> |
| 40 | /// <param name="args">Information to hash.</param> |
| 41 | /// <returns>The generated identifier.</returns> |
| 42 | string GenerateIdentifier(string prefix, params string[] args); |
| 43 | |
| 44 | /// <summary> |
| 45 | /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\". |
| 46 | /// </summary> |
| 47 | /// <param name="fileSource">The Wix.File.Source value with "SourceDir\".</param> |
| 48 | /// <returns>The full path of the file.</returns> |
| 49 | string ResolveFilePath(string fileSource); |
| 50 | } |
| 51 | } |