@joebigelow / wix / commits / 21be8531

Add ICompileContext to BaseCompilerExtension

Bob Arnson committed Dec 20, 2017 at 21:42 UTC 21be85310baadfb1a479ca5b8c4d8f27018ff8f8
1 file changed +7
src/WixToolset.Extensibility/BaseCompilerExtension.cs
+7
@@ -12,6 +12,11 @@ namespace WixToolset.Extensibility
12 /// </summary>
13 public abstract class BaseCompilerExtension : ICompilerExtension
14 {
15 + /// <summary>
16 + /// Context for use by the extension.
17 + /// </summary>
18 + protected ICompileContext Context { get; private set; }
19 +
20 /// <summary>
21 /// Messaging for use by the extension.
22 /// </summary>
@@ -33,6 +38,8 @@ namespace WixToolset.Extensibility
38 /// </summary>
39 public virtual void PreCompile(ICompileContext context)
40 {
41 + this.Context = context;
42 +
43 this.Messaging = context.Messaging;
44
45 this.ParseHelper = context.ServiceProvider.GetService<IParseHelper>();