aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Extensibility/IHarvesterCore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Extensibility/IHarvesterCore.cs')
-rw-r--r--src/WixToolset.Core/Extensibility/IHarvesterCore.cs62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Extensibility/IHarvesterCore.cs b/src/WixToolset.Core/Extensibility/IHarvesterCore.cs
new file mode 100644
index 00000000..9a6fd10c
--- /dev/null
+++ b/src/WixToolset.Core/Extensibility/IHarvesterCore.cs
@@ -0,0 +1,62 @@
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
3namespace WixToolset
4{
5 using System;
6 using System.Diagnostics.CodeAnalysis;
7 using System.IO;
8 using WixToolset.Data;
9 using Wix = WixToolset.Data.Serialize;
10
11 /// <summary>
12 /// The WiX Toolset harvester core.
13 /// </summary>
14 public interface IHarvesterCore
15 {
16 /// <summary>
17 /// Gets whether the harvester core encountered an error while processing.
18 /// </summary>
19 /// <value>Flag if core encountered an error during processing.</value>
20 bool EncounteredError { get; }
21
22 /// <summary>
23 /// Gets or sets the value of the extension argument passed to heat.
24 /// </summary>
25 /// <value>The extension argument.</value>
26 string ExtensionArgument { get; set; }
27
28 /// <summary>
29 /// Gets or sets the value of the root directory that is being harvested.
30 /// </summary>
31 /// <value>The root directory being harvested.</value>
32 string RootDirectory { get; set; }
33
34 /// <summary>
35 /// Create an identifier based on passed file name
36 /// </summary>
37 /// <param name="name">File name to generate identifer from</param>
38 /// <returns></returns>
39 string CreateIdentifierFromFilename(string filename);
40
41 /// <summary>
42 /// Generate an identifier by hashing data from the row.
43 /// </summary>
44 /// <param name="prefix">Three letter or less prefix for generated row identifier.</param>
45 /// <param name="args">Information to hash.</param>
46 /// <returns>The generated identifier.</returns>
47 string GenerateIdentifier(string prefix, params string[] args);
48
49 /// <summary>
50 /// Sends a message to the message delegate if there is one.
51 /// </summary>
52 /// <param name="mea">Message event arguments.</param>
53 void OnMessage(MessageEventArgs mea);
54
55 /// <summary>
56 /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\".
57 /// </summary>
58 /// <param name="fileSource">The Wix.File.Source value with "SourceDir\".</param>
59 /// <returns>The full path of the file.</returns>
60 string ResolveFilePath(string fileSource);
61 }
62}