diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-06-14 11:22:58 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-06-19 13:31:39 +1000 |
| commit | 7a846e7869b2705fa0a184224ef53e2d89f2e8dd (patch) | |
| tree | c8a7e1fd9d2305197ddb049f9bc42c546abe3613 /src/WixToolset.Extensibility/BaseBurnBackendExtension.cs | |
| parent | ce397dd68b6699092d0b038b9a8c353f1f6a425d (diff) | |
| download | wix-7a846e7869b2705fa0a184224ef53e2d89f2e8dd.tar.gz wix-7a846e7869b2705fa0a184224ef53e2d89f2e8dd.tar.bz2 wix-7a846e7869b2705fa0a184224ef53e2d89f2e8dd.zip | |
Add IBurnBackendHelper and TryAddTupleToDataManifest.
Diffstat (limited to 'src/WixToolset.Extensibility/BaseBurnBackendExtension.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/BaseBurnBackendExtension.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs index 58f96b31..5dc36715 100644 --- a/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs +++ b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs | |||
| @@ -6,7 +6,7 @@ namespace WixToolset.Extensibility | |||
| 6 | using WixToolset.Extensibility.Data; | 6 | using WixToolset.Extensibility.Data; |
| 7 | using WixToolset.Extensibility.Services; | 7 | using WixToolset.Extensibility.Services; |
| 8 | 8 | ||
| 9 | public class BaseBurnBackendExtension : IBurnBackendExtension | 9 | public abstract class BaseBurnBackendExtension : IBurnBackendExtension |
| 10 | { | 10 | { |
| 11 | /// <summary> | 11 | /// <summary> |
| 12 | /// Context for use by the extension. | 12 | /// Context for use by the extension. |
| @@ -18,10 +18,20 @@ namespace WixToolset.Extensibility | |||
| 18 | /// </summary> | 18 | /// </summary> |
| 19 | protected IMessaging Messaging { get; private set; } | 19 | protected IMessaging Messaging { get; private set; } |
| 20 | 20 | ||
| 21 | /// <summary> | ||
| 22 | /// Backend helper for use by the extension. | ||
| 23 | /// </summary> | ||
| 24 | protected IBurnBackendHelper BackendHelper { get; private set; } | ||
| 25 | |||
| 21 | public virtual void BundleFinalize() | 26 | public virtual void BundleFinalize() |
| 22 | { | 27 | { |
| 23 | } | 28 | } |
| 24 | 29 | ||
| 30 | public virtual bool IsTupleForExtension(IntermediateTuple tuple) | ||
| 31 | { | ||
| 32 | return false; | ||
| 33 | } | ||
| 34 | |||
| 25 | public virtual void PostBackendBind(IBindResult result) | 35 | public virtual void PostBackendBind(IBindResult result) |
| 26 | { | 36 | { |
| 27 | } | 37 | } |
| @@ -30,6 +40,7 @@ namespace WixToolset.Extensibility | |||
| 30 | { | 40 | { |
| 31 | this.Context = context; | 41 | this.Context = context; |
| 32 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); | 42 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); |
| 43 | this.BackendHelper = context.ServiceProvider.GetService<IBurnBackendHelper>(); | ||
| 33 | } | 44 | } |
| 34 | 45 | ||
| 35 | public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage) | 46 | public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage) |
| @@ -41,5 +52,16 @@ namespace WixToolset.Extensibility | |||
| 41 | { | 52 | { |
| 42 | return null; | 53 | return null; |
| 43 | } | 54 | } |
| 55 | |||
| 56 | public virtual bool TryAddTupleToDataManifest(IntermediateSection section, IntermediateTuple tuple) | ||
| 57 | { | ||
| 58 | if (this.IsTupleForExtension(tuple) && tuple.HasTag(WixToolset.Data.Burn.BurnConstants.BootstrapperApplicationDataTupleDefinitionTag)) | ||
| 59 | { | ||
| 60 | this.BackendHelper.AddBootstrapperApplicationData(tuple); | ||
| 61 | return true; | ||
| 62 | } | ||
| 63 | |||
| 64 | return false; | ||
| 65 | } | ||
| 44 | } | 66 | } |
| 45 | } | 67 | } |
