diff options
| author | Rob Mensching <rob@firegiant.com> | 2018-10-24 20:55:33 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2018-10-24 21:11:31 -0700 |
| commit | ce51350ca9c020312810447f64a3f40145f749bd (patch) | |
| tree | d063bd780a9148690de35c3ee94e6753d808ebf8 /src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs | |
| parent | b86e235ef4f9423624fc93e1c417484e938245df (diff) | |
| download | wix-ce51350ca9c020312810447f64a3f40145f749bd.tar.gz wix-ce51350ca9c020312810447f64a3f40145f749bd.tar.bz2 wix-ce51350ca9c020312810447f64a3f40145f749bd.zip | |
Fix "binder" names in interfaces and file names
Diffstat (limited to 'src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs | 70 |
1 files changed, 70 insertions, 0 deletions
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 @@ | |||
| 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.Extensibility | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using WixToolset.Data; | ||
| 7 | using WixToolset.Data.Tuples; | ||
| 8 | using WixToolset.Data.WindowsInstaller; | ||
| 9 | using WixToolset.Extensibility.Data; | ||
| 10 | using WixToolset.Extensibility.Services; | ||
| 11 | |||
| 12 | /// <summary> | ||
| 13 | /// Base class for creating a preprocessor extension. | ||
| 14 | /// </summary> | ||
| 15 | public abstract class BaseWindowsInstallerBackendBinderExtension : IWindowsInstallerBackendBinderExtension | ||
| 16 | { | ||
| 17 | /// <summary> | ||
| 18 | /// Context for use by the extension. | ||
| 19 | /// </summary> | ||
| 20 | protected IBindContext Context { get; private set; } | ||
| 21 | |||
| 22 | /// <summary> | ||
| 23 | /// Messaging for use by the extension. | ||
| 24 | /// </summary> | ||
| 25 | protected IMessaging Messaging { get; private set; } | ||
| 26 | |||
| 27 | /// <summary> | ||
| 28 | /// Backend helper for use by the extension. | ||
| 29 | /// </summary> | ||
| 30 | protected IWindowsInstallerBackendHelper BackendHelper { get; private set; } | ||
| 31 | |||
| 32 | /// <summary> | ||
| 33 | /// Optional table definitions to automatically map to tuples. | ||
| 34 | /// </summary> | ||
| 35 | protected virtual TableDefinition[] TableDefinitionsForTuples { get; } | ||
| 36 | |||
| 37 | public virtual void PreBackendBind(IBindContext context) | ||
| 38 | { | ||
| 39 | this.Context = context; | ||
| 40 | |||
| 41 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); | ||
| 42 | |||
| 43 | this.BackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>(); | ||
| 44 | } | ||
| 45 | |||
| 46 | public virtual ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files) | ||
| 47 | { | ||
| 48 | return null; | ||
| 49 | } | ||
| 50 | |||
| 51 | public virtual string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory) | ||
| 52 | { | ||
| 53 | return null; | ||
| 54 | } | ||
| 55 | |||
| 56 | public virtual bool TryAddTupleToOutput(IntermediateTuple tuple, Output output) | ||
| 57 | { | ||
| 58 | if (this.TableDefinitionsForTuples != null) | ||
| 59 | { | ||
| 60 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitionsForTuples); | ||
| 61 | } | ||
| 62 | |||
| 63 | return false; | ||
| 64 | } | ||
| 65 | |||
| 66 | public virtual void PostBackendBind(BindResult result, Pdb pdb) | ||
| 67 | { | ||
| 68 | } | ||
| 69 | } | ||
| 70 | } | ||
