//------------------------------------------------------------------------------------------------- // // Copyright (c) 2004, Outercurve Foundation. // This software is released under Microsoft Reciprocal License (MS-RL). // The license and further copyright text can be found in the file // LICENSE.TXT at the root directory of the distribution. // // // // The Windows Installer XML Toolset Bal extension. // //------------------------------------------------------------------------------------------------- namespace Microsoft.Tools.WindowsInstallerXml.Extensions { using System; using System.Reflection; /// /// The Windows Installer XML Toolset Bal Extension. /// public sealed class BalExtension : WixExtension { private BalCompiler compilerExtension; private Library library; private TableDefinitionCollection tableDefinitions; private BalPreprocessorExtension preprocessorExtension; /// /// Gets the optional compiler extension. /// /// The optional compiler extension. public override CompilerExtension CompilerExtension { get { if (null == this.compilerExtension) { this.compilerExtension = new BalCompiler(); } return this.compilerExtension; } } /// /// Gets the optional table definitions for this extension. /// /// The optional table definitions for this extension. public override TableDefinitionCollection TableDefinitions { get { if (null == this.tableDefinitions) { this.tableDefinitions = LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Data.tables.xml"); } return this.tableDefinitions; } } /// /// Gets the library associated with this extension. /// /// The table definitions to use while loading the library. /// The loaded library. public override Library GetLibrary(TableDefinitionCollection tableDefinitions) { if (null == this.library) { this.library = LoadLibraryHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Data.balExt.wixlib", tableDefinitions); } return this.library; } /// /// Gets the optional preprocessor extension. /// /// The optional preprocessor extension. public override PreprocessorExtension PreprocessorExtension { get { if (null == this.preprocessorExtension) { this.preprocessorExtension = new BalPreprocessorExtension(); } return this.preprocessorExtension; } } } }