aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/HeatCore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/HeatCore.cs')
-rw-r--r--src/WixToolset.Core/HeatCore.cs65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/WixToolset.Core/HeatCore.cs b/src/WixToolset.Core/HeatCore.cs
new file mode 100644
index 00000000..5c5defe8
--- /dev/null
+++ b/src/WixToolset.Core/HeatCore.cs
@@ -0,0 +1,65 @@
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.Tools
4{
5 using System;
6 using System.Reflection;
7 using WixToolset.Data;
8 using WixToolset.Extensibilty;
9 using Wix = WixToolset.Data.Serialize;
10
11 /// <summary>
12 /// The WiX Toolset Harvester application core.
13 /// </summary>
14 public sealed class HeatCore : IHeatCore, IMessageHandler
15 {
16 private Harvester harvester;
17 private Mutator mutator;
18
19 /// <summary>
20 /// Instantiates a new HeatCore.
21 /// </summary>
22 /// <param name="messageHandler">The message handler for the core.</param>
23 public HeatCore()
24 {
25 this.harvester = new Harvester();
26 this.mutator = new Mutator();
27 }
28
29 /// <summary>
30 /// Gets whether the mutator core encountered an error while processing.
31 /// </summary>
32 /// <value>Flag if core encountered an error during processing.</value>
33 public bool EncounteredError
34 {
35 get { return Messaging.Instance.EncounteredError; }
36 }
37
38 /// <summary>
39 /// Gets the harvester.
40 /// </summary>
41 /// <value>The harvester.</value>
42 public Harvester Harvester
43 {
44 get { return this.harvester; }
45 }
46
47 /// <summary>
48 /// Gets the mutator.
49 /// </summary>
50 /// <value>The mutator.</value>
51 public Mutator Mutator
52 {
53 get { return this.mutator; }
54 }
55
56 /// <summary>
57 /// Sends a message to the message delegate if there is one.
58 /// </summary>
59 /// <param name="mea">Message event arguments.</param>
60 public void OnMessage(MessageEventArgs mea)
61 {
62 Messaging.Instance.OnMessage(mea);
63 }
64 }
65}