diff options
Diffstat (limited to 'src/WixToolset.Core/BinderCore.cs')
-rw-r--r-- | src/WixToolset.Core/BinderCore.cs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/WixToolset.Core/BinderCore.cs b/src/WixToolset.Core/BinderCore.cs new file mode 100644 index 00000000..0feae0b2 --- /dev/null +++ b/src/WixToolset.Core/BinderCore.cs | |||
@@ -0,0 +1,58 @@ | |||
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 | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Extensibility; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Core class for the binder. | ||
10 | /// </summary> | ||
11 | internal class BinderCore : IBinderCore | ||
12 | { | ||
13 | /// <summary> | ||
14 | /// Constructor for binder core. | ||
15 | /// </summary> | ||
16 | internal BinderCore() | ||
17 | { | ||
18 | this.TableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions()); | ||
19 | } | ||
20 | |||
21 | public IBinderFileManagerCore FileManagerCore { get; set; } | ||
22 | |||
23 | /// <summary> | ||
24 | /// Gets whether the binder core encountered an error while processing. | ||
25 | /// </summary> | ||
26 | /// <value>Flag if core encountered an error during processing.</value> | ||
27 | public bool EncounteredError | ||
28 | { | ||
29 | get { return Messaging.Instance.EncounteredError; } | ||
30 | } | ||
31 | |||
32 | /// <summary> | ||
33 | /// Gets the table definitions used by the Binder. | ||
34 | /// </summary> | ||
35 | /// <value>Table definitions used by the binder.</value> | ||
36 | public TableDefinitionCollection TableDefinitions { get; private set; } | ||
37 | |||
38 | /// <summary> | ||
39 | /// Generate an identifier by hashing data from the row. | ||
40 | /// </summary> | ||
41 | /// <param name="prefix">Three letter or less prefix for generated row identifier.</param> | ||
42 | /// <param name="args">Information to hash.</param> | ||
43 | /// <returns>The generated identifier.</returns> | ||
44 | public string CreateIdentifier(string prefix, params string[] args) | ||
45 | { | ||
46 | return Common.GenerateIdentifier(prefix, args); | ||
47 | } | ||
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 | public void OnMessage(MessageEventArgs e) | ||
54 | { | ||
55 | Messaging.Instance.OnMessage(e); | ||
56 | } | ||
57 | } | ||
58 | } | ||