// 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.
namespace WixToolset
{
using WixToolset.Data;
using WixToolset.Extensibility;
///
/// Core class for the binder.
///
internal class BinderCore : IBinderCore
{
///
/// Constructor for binder core.
///
internal BinderCore()
{
this.TableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
}
public IBinderFileManagerCore FileManagerCore { get; set; }
///
/// Gets whether the binder core encountered an error while processing.
///
/// Flag if core encountered an error during processing.
public bool EncounteredError
{
get { return Messaging.Instance.EncounteredError; }
}
///
/// Gets the table definitions used by the Binder.
///
/// Table definitions used by the binder.
public TableDefinitionCollection TableDefinitions { get; private set; }
///
/// Generate an identifier by hashing data from the row.
///
/// Three letter or less prefix for generated row identifier.
/// Information to hash.
/// The generated identifier.
public string CreateIdentifier(string prefix, params string[] args)
{
return Common.GenerateIdentifier(prefix, args);
}
///
/// Sends a message to the message delegate if there is one.
///
/// Message event arguments.
public void OnMessage(MessageEventArgs e)
{
Messaging.Instance.OnMessage(e);
}
}
}