diff options
Diffstat (limited to 'src/WixToolset.Extensibility/BaseBurnBackendExtension.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/BaseBurnBackendExtension.cs | 63 |
1 files changed, 22 insertions, 41 deletions
diff --git a/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs index 0575d725..488f882a 100644 --- a/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs +++ b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility | 3 | namespace WixToolset.Extensibility |
| 4 | { | 4 | { |
| 5 | using System; | ||
| 5 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 6 | using System.Linq; | 7 | using System.Linq; |
| 7 | using WixToolset.Data; | 8 | using WixToolset.Data; |
| @@ -35,24 +36,8 @@ namespace WixToolset.Extensibility | |||
| 35 | protected virtual IEnumerable<IntermediateSymbolDefinition> SymbolDefinitions => Enumerable.Empty<IntermediateSymbolDefinition>(); | 36 | protected virtual IEnumerable<IntermediateSymbolDefinition> SymbolDefinitions => Enumerable.Empty<IntermediateSymbolDefinition>(); |
| 36 | 37 | ||
| 37 | /// <summary> | 38 | /// <summary> |
| 38 | /// Called after all output changes occur and right before the output is bound into its final format. | 39 | /// See <see cref="IBurnBackendExtension.PreBackendBind(IBindContext)"/> |
| 39 | /// </summary> | 40 | /// </summary> |
| 40 | public virtual void BundleFinalize() | ||
| 41 | { | ||
| 42 | } | ||
| 43 | |||
| 44 | /// <summary> | ||
| 45 | /// Called after output is bound into its final format. | ||
| 46 | /// </summary> | ||
| 47 | /// <param name="result"></param> | ||
| 48 | public virtual void PostBackendBind(IBindResult result) | ||
| 49 | { | ||
| 50 | } | ||
| 51 | |||
| 52 | /// <summary> | ||
| 53 | /// Called before binding occurs. | ||
| 54 | /// </summary> | ||
| 55 | /// <param name="context"></param> | ||
| 56 | public virtual void PreBackendBind(IBindContext context) | 41 | public virtual void PreBackendBind(IBindContext context) |
| 57 | { | 42 | { |
| 58 | this.Context = context; | 43 | this.Context = context; |
| @@ -61,44 +46,32 @@ namespace WixToolset.Extensibility | |||
| 61 | } | 46 | } |
| 62 | 47 | ||
| 63 | /// <summary> | 48 | /// <summary> |
| 64 | /// | 49 | /// See <see cref="IBurnBackendExtension.ResolveRelatedFile(String, String, String, SourceLineNumber)"/> |
| 65 | /// </summary> | 50 | /// </summary> |
| 66 | /// <param name="source"></param> | 51 | public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers) |
| 67 | /// <param name="relatedSource"></param> | ||
| 68 | /// <param name="type"></param> | ||
| 69 | /// <param name="sourceLineNumbers"></param> | ||
| 70 | /// <param name="bindStage"></param> | ||
| 71 | /// <returns></returns> | ||
| 72 | public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage) | ||
| 73 | { | 52 | { |
| 74 | return null; | 53 | return null; |
| 75 | } | 54 | } |
| 76 | 55 | ||
| 77 | /// <summary> | 56 | /// <summary> |
| 78 | /// | 57 | /// See <see cref="IBurnBackendExtension.SymbolsFinalized(IntermediateSection)"/> |
| 58 | /// </summary> | ||
| 59 | public virtual void SymbolsFinalized(IntermediateSection section) | ||
| 60 | { | ||
| 61 | } | ||
| 62 | |||
| 63 | /// <summary> | ||
| 64 | /// See <see cref="IBurnBackendExtension.ResolveUrl(String, String, String, String, String)"/> | ||
| 79 | /// </summary> | 65 | /// </summary> |
| 80 | /// <param name="url"></param> | ||
| 81 | /// <param name="fallbackUrl"></param> | ||
| 82 | /// <param name="packageId"></param> | ||
| 83 | /// <param name="payloadId"></param> | ||
| 84 | /// <param name="fileName"></param> | ||
| 85 | /// <returns></returns> | ||
| 86 | public virtual string ResolveUrl(string url, string fallbackUrl, string packageId, string payloadId, string fileName) | 66 | public virtual string ResolveUrl(string url, string fallbackUrl, string packageId, string payloadId, string fileName) |
| 87 | { | 67 | { |
| 88 | return null; | 68 | return null; |
| 89 | } | 69 | } |
| 90 | 70 | ||
| 91 | /// <summary> | 71 | /// <summary> |
| 92 | /// Called for each extension symbol that hasn't been handled yet. | 72 | /// See <see cref="IBurnBackendExtension.TryProcessSymbol(IntermediateSection, IntermediateSymbol)"/> |
| 93 | /// Use IBurnBackendHelper to add data to the appropriate data manifest. | ||
| 94 | /// </summary> | 73 | /// </summary> |
| 95 | /// <param name="section">The linked section.</param> | 74 | public virtual bool TryProcessSymbol(IntermediateSection section, IntermediateSymbol symbol) |
| 96 | /// <param name="symbol">The current symbol.</param> | ||
| 97 | /// <returns> | ||
| 98 | /// True if the extension handled the symbol, false otherwise. | ||
| 99 | /// The Burn backend will warn on all unhandled symbols. | ||
| 100 | /// </returns> | ||
| 101 | public virtual bool TryAddSymbolToDataManifest(IntermediateSection section, IntermediateSymbol symbol) | ||
| 102 | { | 75 | { |
| 103 | if (this.SymbolDefinitions.Any(t => t == symbol.Definition) && | 76 | if (this.SymbolDefinitions.Any(t => t == symbol.Definition) && |
| 104 | symbol.Definition.HasTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag)) | 77 | symbol.Definition.HasTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag)) |
| @@ -109,5 +82,13 @@ namespace WixToolset.Extensibility | |||
| 109 | 82 | ||
| 110 | return false; | 83 | return false; |
| 111 | } | 84 | } |
| 85 | |||
| 86 | /// <summary> | ||
| 87 | /// See <see cref="IBurnBackendExtension.PostBackendBind(IBindResult)"/> | ||
| 88 | /// </summary> | ||
| 89 | /// <param name="result"></param> | ||
| 90 | public virtual void PostBackendBind(IBindResult result) | ||
| 91 | { | ||
| 92 | } | ||
| 112 | } | 93 | } |
| 113 | } | 94 | } |
