summaryrefslogtreecommitdiff
path: root/src/tools/heat/Extensibility/IMutator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/heat/Extensibility/IMutator.cs')
-rw-r--r--src/tools/heat/Extensibility/IMutator.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tools/heat/Extensibility/IMutator.cs b/src/tools/heat/Extensibility/IMutator.cs
new file mode 100644
index 00000000..c936339e
--- /dev/null
+++ b/src/tools/heat/Extensibility/IMutator.cs
@@ -0,0 +1,44 @@
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.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7 /// <summary>
8 /// Interface for a mutator.
9 /// </summary>
10 public interface IMutator
11 {
12 /// <summary>
13 /// Gets or sets the harvester core for the extension.
14 /// </summary>
15 /// <value>The harvester core for the extension.</value>
16 IHarvesterCore Core { get; }
17
18 /// <summary>
19 /// Gets or sets the value of the extension argument passed to heat.
20 /// </summary>
21 /// <value>The extension argument.</value>
22 string ExtensionArgument { get; }
23
24 /// <summary>
25 /// Adds a mutator extension.
26 /// </summary>
27 /// <param name="mutatorExtension">The mutator extension to add.</param>
28 void AddExtension(IMutatorExtension mutatorExtension);
29
30 /// <summary>
31 /// Mutate a WiX document.
32 /// </summary>
33 /// <param name="wix">The Wix document element.</param>
34 /// <returns>true if mutation was successful</returns>
35 bool Mutate(Wix.Wix wix);
36
37 /// <summary>
38 /// Mutate a WiX document.
39 /// </summary>
40 /// <param name="wixString">The Wix document as a string.</param>
41 /// <returns>The mutated Wix document as a string if mutation was successful, else null.</returns>
42 string Mutate(string wixString);
43 }
44}