From ce51350ca9c020312810447f64a3f40145f749bd Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 24 Oct 2018 20:55:33 -0700 Subject: Fix "binder" names in interfaces and file names --- .../BaseWindowsInstallerBackendBinderExtension.cs | 70 ++++++++++++++++++++++ .../BaseWindowsInstallerBackendExtension.cs | 70 ---------------------- src/WixToolset.Extensibility/IBindExtension.cs | 23 ------- src/WixToolset.Extensibility/IBinderExtension.cs | 22 +++++++ .../IWindowsInstallerBackendBinderExtension.cs | 32 ++++++++++ .../IWindowsInstallerBackendExtension.cs | 33 ---------- 6 files changed, 124 insertions(+), 126 deletions(-) create mode 100644 src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs delete mode 100644 src/WixToolset.Extensibility/BaseWindowsInstallerBackendExtension.cs delete mode 100644 src/WixToolset.Extensibility/IBindExtension.cs create mode 100644 src/WixToolset.Extensibility/IBinderExtension.cs create mode 100644 src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs delete mode 100644 src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..c5ee9d1b --- /dev/null +++ b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs @@ -0,0 +1,70 @@ +// 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.Extensibility +{ + using System.Collections.Generic; + using WixToolset.Data; + using WixToolset.Data.Tuples; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + + /// + /// Base class for creating a preprocessor extension. + /// + public abstract class BaseWindowsInstallerBackendBinderExtension : IWindowsInstallerBackendBinderExtension + { + /// + /// Context for use by the extension. + /// + protected IBindContext Context { get; private set; } + + /// + /// Messaging for use by the extension. + /// + protected IMessaging Messaging { get; private set; } + + /// + /// Backend helper for use by the extension. + /// + protected IWindowsInstallerBackendHelper BackendHelper { get; private set; } + + /// + /// Optional table definitions to automatically map to tuples. + /// + protected virtual TableDefinition[] TableDefinitionsForTuples { get; } + + public virtual void PreBackendBind(IBindContext context) + { + this.Context = context; + + this.Messaging = context.ServiceProvider.GetService(); + + this.BackendHelper = context.ServiceProvider.GetService(); + } + + public virtual ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable files) + { + return null; + } + + public virtual string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory) + { + return null; + } + + public virtual bool TryAddTupleToOutput(IntermediateTuple tuple, Output output) + { + if (this.TableDefinitionsForTuples != null) + { + return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitionsForTuples); + } + + return false; + } + + public virtual void PostBackendBind(BindResult result, Pdb pdb) + { + } + } +} diff --git a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendExtension.cs b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendExtension.cs deleted file mode 100644 index 4393dfda..00000000 --- a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendExtension.cs +++ /dev/null @@ -1,70 +0,0 @@ -// 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.Extensibility -{ - using System.Collections.Generic; - using WixToolset.Data; - using WixToolset.Data.Tuples; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - - /// - /// Base class for creating a preprocessor extension. - /// - public abstract class BaseWindowsInstallerBackendExtension : IWindowsInstallerBackendExtension - { - /// - /// Context for use by the extension. - /// - protected IBindContext Context { get; private set; } - - /// - /// Messaging for use by the extension. - /// - protected IMessaging Messaging { get; private set; } - - /// - /// Backend helper for use by the extension. - /// - protected IWindowsInstallerBackendHelper BackendHelper { get; private set; } - - /// - /// Optional table definitions to automatically map to tuples. - /// - protected virtual TableDefinition[] TableDefinitionsForTuples { get; } - - public virtual void PreBackendBind(IBindContext context) - { - this.Context = context; - - this.Messaging = context.ServiceProvider.GetService(); - - this.BackendHelper = context.ServiceProvider.GetService(); - } - - public virtual ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable files) - { - return null; - } - - public virtual string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory) - { - return null; - } - - public virtual bool TryAddTupleToOutput(IntermediateTuple tuple, Output output) - { - if (this.TableDefinitionsForTuples != null) - { - return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitionsForTuples); - } - - return false; - } - - public virtual void PostBackendBind(BindResult result, Pdb pdb) - { - } - } -} diff --git a/src/WixToolset.Extensibility/IBindExtension.cs b/src/WixToolset.Extensibility/IBindExtension.cs deleted file mode 100644 index 2dcf5eff..00000000 --- a/src/WixToolset.Extensibility/IBindExtension.cs +++ /dev/null @@ -1,23 +0,0 @@ -// 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.Extensibility -{ - using WixToolset.Data.Bind; - using WixToolset.Extensibility.Data; - - /// - /// Interface all binder extensions implement. - /// - public interface IBinderExtension - { - /// - /// Called before binding occurs. - /// - void PreBind(IBindContext context); - - /// - /// Called after all binding occurs. - /// - void PostBind(BindResult result); - } -} diff --git a/src/WixToolset.Extensibility/IBinderExtension.cs b/src/WixToolset.Extensibility/IBinderExtension.cs new file mode 100644 index 00000000..2656e106 --- /dev/null +++ b/src/WixToolset.Extensibility/IBinderExtension.cs @@ -0,0 +1,22 @@ +// 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.Extensibility +{ + using WixToolset.Extensibility.Data; + + /// + /// Interface all binder extensions implement. + /// + public interface IBinderExtension + { + /// + /// Called before binding occurs. + /// + void PreBind(IBindContext context); + + /// + /// Called after all binding occurs. + /// + void PostBind(BindResult result); + } +} diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..5f34d3e1 --- /dev/null +++ b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs @@ -0,0 +1,32 @@ +// 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.Extensibility +{ + using System.Collections.Generic; + using WixToolset.Data; + using WixToolset.Data.Tuples; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility.Data; + + /// + /// Interface all binder extensions implement. + /// + public interface IWindowsInstallerBackendBinderExtension + { + /// + /// Called before binding occurs. + /// + void PreBackendBind(IBindContext context); + + ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable files); + + string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory); + + bool TryAddTupleToOutput(IntermediateTuple tuple, Output output); + + /// + /// Called after all output changes occur and right before the output is bound into its final format. + /// + void PostBackendBind(BindResult result, Pdb wixpdb); + } +} diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs deleted file mode 100644 index bc251bb2..00000000 --- a/src/WixToolset.Extensibility/IWindowsInstallerBackendExtension.cs +++ /dev/null @@ -1,33 +0,0 @@ -// 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.Extensibility -{ - using System.Collections.Generic; - using WixToolset.Data; - using WixToolset.Data.Bind; - using WixToolset.Data.Tuples; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Extensibility.Data; - - /// - /// Interface all binder extensions implement. - /// - public interface IWindowsInstallerBackendExtension - { - /// - /// Called before binding occurs. - /// - void PreBackendBind(IBindContext context); - - ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable files); - - string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory); - - bool TryAddTupleToOutput(IntermediateTuple tuple, Output output); - - /// - /// Called after all output changes occur and right before the output is bound into its final format. - /// - void PostBackendBind(BindResult result, Pdb wixpdb); - } -} -- cgit v1.2.3-55-g6feb